From 99daecdac917d149f4643e090cb705df135e2ed1 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 2 Mar 2018 13:18:18 +0000 Subject: Minor improvements to build Exclude source files in libbb that aren't used by busybox-w32. This speeds up the build marginally. They can always be reinstated if necessary. Provide fake routines for everything in inode_hash.c so that it can be excluded. inode_hash.c is now unchanged from upstream. Use last_char_is in has_exe_suffix_or_dot. It doesn't save any bytes but it makes the code neater. --- include/libbb.h | 8 ++++++-- include/mingw.h | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index f8e54de54..e816a2726 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1662,11 +1662,15 @@ int bb_xioctl(int fd, unsigned request, void *argp) FAST_FUNC; #define xioctl(fd,request,argp) bb_xioctl(fd,request,argp) #endif -char *is_in_ino_dev_hashtable(const struct stat *statbuf) FAST_FUNC; #if !ENABLE_PLATFORM_MINGW32 +char *is_in_ino_dev_hashtable(const struct stat *statbuf) FAST_FUNC; void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) FAST_FUNC; -#endif void reset_ino_dev_hashtable(void) FAST_FUNC; +#else +#define add_to_ino_dev_hashtable(s, n) (void)0 +#define is_in_ino_dev_hashtable(s) NULL +#define reset_ino_dev_hashtable() +#endif #ifdef __GLIBC__ /* At least glibc has horrendously large inline for this, so wrap it */ unsigned long long bb_makedev(unsigned major, unsigned minor) FAST_FUNC; diff --git a/include/mingw.h b/include/mingw.h index 1bb2032cd..09903d582 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -435,7 +435,6 @@ const char * next_path_sep(const char *path); #define is_absolute_path(path) ((path)[0] == '/' || (path)[0] == '\\' || has_dos_drive_prefix(path)) #define find_mount_point(n, s) find_mount_point(n) -#define add_to_ino_dev_hashtable(s, n) (void)0 /* * helpers -- cgit v1.2.3-55-g6feb