OSDN Git Service

include headers only if the related option is enabled
authorPeter S. Mazinger <ps.m@gmx.net>
Wed, 21 Sep 2005 23:33:29 +0000 (23:33 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Wed, 21 Sep 2005 23:33:29 +0000 (23:33 -0000)
libc/pwd_grp/pwd_grp.c
libc/unistd/getopt.c
libc/unistd/sysconf.c
librt/kernel-posix-timers.h

index 91c0d83..e56b545 100644 (file)
 #include <ctype.h>
 #include <pwd.h>
 #include <grp.h>
+#include <paths.h>
+#ifdef __HAS_SHADOW__
 #include <shadow.h>
+#endif
 #ifdef __UCLIBC_HAS_THREADS__
 #include <pthread.h>
 #endif
index 504f376..0dc0e05 100644 (file)
  * Modified once again for uClibc by Erik Andersen 8/7/02
  */
 
+#include <features.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 #include <libintl.h>
+#endif
 
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning TODO: Enable gettext awareness.
index f5b49a1..902697b 100644 (file)
@@ -29,7 +29,9 @@
 #include <unistd.h>
 #include <sys/sysinfo.h>
 #include <sys/types.h>
+#ifdef __UCLIBC_HAS_REGEX__
 #include <regex.h>
+#endif
 
 #ifndef __UCLIBC_CLK_TCK_CONST
 #error __UCLIBC_CLK_TCK_CONST not defined!
index 5724af0..bf246c9 100644 (file)
@@ -2,10 +2,13 @@
  * kernel-posix-timers.h - kernel-dependent definitions for POSIX timers.
  */
 
+#include <features.h>
 #include <setjmp.h>
 #include <signal.h>
 #include <sys/types.h>
+#ifdef __UCLIBC_HAS_THREADS__
 #include <pthread.h>
+#endif
 
 /* Type of timers in the kernel */
 typedef int kernel_timer_t;
@@ -27,5 +30,7 @@ struct timer {
     /* Parameters for the thread to be started for SIGEV_THREAD */
     void (*thrfunc) (sigval_t);
     sigval_t sival;
+#ifdef __UCLIBC_HAS_THREADS__
     pthread_attr_t attr;
+#endif
 };