diff options
-rw-r--r-- | Makefile.in | 36 | ||||
-rwxr-xr-x | extra/scripts/conf-header.sh | 2 | ||||
-rw-r--r-- | include/features.h | 2 | ||||
-rw-r--r-- | include/netdb.h | 2 | ||||
-rw-r--r-- | include/protocols/timed.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/types.h | 4 |
6 files changed, 37 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in index e56f5c724..3234b050f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -214,6 +214,13 @@ install_headers: headers $(top_builddir)extra/scripts/unifdef $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_sigaction.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_stat.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/kernel_types.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/utmpx.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/atomic.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/atomic.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sigcontextinfo.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/stackinfo.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_arch_features.h ifneq ($(UCLIBC_HAS_FLOATS),y) # Remove floating point related headers since float support is disabled. $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h @@ -222,6 +229,7 @@ ifneq ($(UCLIBC_HAS_FLOATS),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/math*.h endif ifneq ($(UCLIBC_HAS_FENV),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \ @@ -285,6 +293,7 @@ ifneq ($(UCLIBC_HAS_THREADS),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/initspin.h endif ifneq ($(HAVE_SHARED),y) # Remove dlfcn header if we don't have shared libraries. @@ -307,6 +316,7 @@ ifneq ($(UCLIBC_SUSV3_LEGACY),y) # Remove timeb.h since the LEGACY ftime() was disabled upon request $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ucontext.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h endif ifneq ($(UCLIBC_HAS_EPOLL),y) # Remove epoll.h since epoll_*() were disabled upon request @@ -335,6 +345,7 @@ ifneq ($(UCLIBC_LINUX_SPECIFIC),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/swap.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sysctl.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/vfs.h + $(RM) ${PREFIX}$(DEVEL_PREFIX)include/sys/sysinfo.h endif ifneq ($(UCLIBC_SV4_DEPRECATED),y) # Remove ustat.h since deprecated SV4 support was disabled upon request @@ -342,20 +353,13 @@ ifneq ($(UCLIBC_SV4_DEPRECATED),y) $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/ustat.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/ustat.h endif -ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_ADVANCED_REALTIME),) - # Remove SUSv-realtime related message-queue headers upon request - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/mqueue.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h -endif ifneq ($(UCLIBC_HAS_REALTIME),y) # Remove SUSv-realtime related headers upon request + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/mqueue.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/mqueue.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sched.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sched.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/sched.h $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/semaphore.h - $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/semaphore.h endif ifneq ($(UCLIBC_HAS_SOCKET),y) # Remove socket related headers upon request @@ -371,6 +375,20 @@ ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y) # Remove ifaddrs.h since the corresponding functionality is disabled $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h endif +ifneq ($(UCLIBC_HAS_SYSLOG),y) + # Remove syslog.h since the corresponding functionality is disabled + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/syslog.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/syslog.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/syslog*.h +endif +ifneq ($(UCLIBC_HAS_RPC),y) + $(RM) -r $(PREFIX)$(DEVEL_PREFIX)include/rpc +endif +ifneq ($(UCLIBC_HAS_IPV6),y) + # Remove IPv6 headers since the corresponding functionality is disabled + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/netinet/ip6.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/netinet/icmp6.h +endif # Installs development library links. install_dev: install_headers all diff --git a/extra/scripts/conf-header.sh b/extra/scripts/conf-header.sh index 90dfa999a..8044f8c06 100755 --- a/extra/scripts/conf-header.sh +++ b/extra/scripts/conf-header.sh @@ -8,7 +8,7 @@ if [ -z "$1" ] ; then fi cat <<EOF -#if !defined __FEATURES_H && !defined __need_uClibc_config_h +#if !defined _FEATURES_H && !defined __need_uClibc_config_h # error Never include <bits/uClibc_config.h> directly; use <features.h> instead #endif diff --git a/include/features.h b/include/features.h index c943c9e6e..1b401497d 100644 --- a/include/features.h +++ b/include/features.h @@ -34,7 +34,9 @@ #define __need_uClibc_config_h #include <bits/uClibc_config.h> #undef __need_uClibc_config_h +#ifdef UCLIBC_INTERNAL #include <bits/uClibc_arch_features.h> +#endif /* For uClibc, always optimize for size -- this should disable * a lot of expensive inlining... diff --git a/include/netdb.h b/include/netdb.h index 7d76b9c26..99e02f050 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -27,7 +27,7 @@ #include <netinet/in.h> #include <stdint.h> -#ifdef __USE_MISC +#if defined __USE_MISC && defined __UCLIBC_HAS_RPC__ /* This is necessary to make this include file properly replace the Sun version. */ # include <rpc/netdb.h> diff --git a/include/protocols/timed.h b/include/protocols/timed.h index da31f69b3..8101e9924 100644 --- a/include/protocols/timed.h +++ b/include/protocols/timed.h @@ -32,7 +32,9 @@ #ifndef _PROTOCOLS_TIMED_H #define _PROTOCOLS_TIMED_H 1 +#ifdef __UCLIBC_HAS_RPC__ #include <rpc/types.h> +#endif /* * Time Synchronization Protocol diff --git a/libc/sysdeps/linux/common/bits/types.h b/libc/sysdeps/linux/common/bits/types.h index 755af2ec9..141db43d3 100644 --- a/libc/sysdeps/linux/common/bits/types.h +++ b/libc/sysdeps/linux/common/bits/types.h @@ -29,7 +29,9 @@ #define __need_size_t #include <stddef.h> +#ifdef UCLIBC_INTERNAL #include <bits/kernel_types.h> +#endif /* Convenience types. */ typedef unsigned char __u_char; @@ -198,8 +200,10 @@ __STD_TYPE __U32_TYPE __socklen_t; #undef __STD_TYPE +#ifdef UCLIBC_INTERNAL /* Used in `struct shmid_ds'. */ typedef __kernel_ipc_pid_t __ipc_pid_t; +#endif /* Now add the thread types. */ #if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98) |