diff options
author | Ron Yorston <rmy@pobox.com> | 2023-04-16 13:13:52 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-04-16 13:13:52 +0100 |
commit | 74734bff81dc2e1a5b160d5621eeea35c5defabd (patch) | |
tree | fdc363020207ff3538023a1a37a801a1fb9ea9b3 /include | |
parent | 86ff1772f25dff819c1983418ac36822745a6d19 (diff) | |
download | busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.tar.gz busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.tar.bz2 busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.zip |
libbb: don't build useless functions
The functions ndelay_on(), ndelay_off() and close_on_exec_on()
don't do anything useful because our fcntl(2) implementation
doesn't support the features they require.
Replace them with stubs.
Saves 176-208 bytes.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 7683b3f63..a4eebab99 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -592,9 +592,15 @@ const char* endofname(const char *name) FAST_FUNC; | |||
592 | char *is_prefixed_with(const char *string, const char *key) FAST_FUNC; | 592 | char *is_prefixed_with(const char *string, const char *key) FAST_FUNC; |
593 | char *is_suffixed_with(const char *string, const char *key) FAST_FUNC; | 593 | char *is_suffixed_with(const char *string, const char *key) FAST_FUNC; |
594 | 594 | ||
595 | #if !ENABLE_PLATFORM_MINGW32 | ||
595 | int ndelay_on(int fd) FAST_FUNC; | 596 | int ndelay_on(int fd) FAST_FUNC; |
596 | int ndelay_off(int fd) FAST_FUNC; | 597 | int ndelay_off(int fd) FAST_FUNC; |
597 | void close_on_exec_on(int fd) FAST_FUNC; | 598 | void close_on_exec_on(int fd) FAST_FUNC; |
599 | #else | ||
600 | static inline int ndelay_on(int fd UNUSED_PARAM) { return 0; } | ||
601 | static inline int ndelay_off(int fd UNUSED_PARAM) { return 0; } | ||
602 | static inline void close_on_exec_on(int fd UNUSED_PARAM) { return; } | ||
603 | #endif | ||
598 | void xdup2(int, int) FAST_FUNC; | 604 | void xdup2(int, int) FAST_FUNC; |
599 | void xmove_fd(int, int) FAST_FUNC; | 605 | void xmove_fd(int, int) FAST_FUNC; |
600 | 606 | ||