svn commit: trunk/uClibc: libc/pwd_grp libc/unistd librt

psm at uclibc.org psm at uclibc.org
Wed Sep 21 23:33:31 UTC 2005


Author: psm
Date: 2005-09-21 16:33:29 -0700 (Wed, 21 Sep 2005)
New Revision: 11544

Log:
include headers only if the related option is enabled

Modified:
   trunk/uClibc/libc/pwd_grp/pwd_grp.c
   trunk/uClibc/libc/unistd/getopt.c
   trunk/uClibc/libc/unistd/sysconf.c
   trunk/uClibc/librt/kernel-posix-timers.h


Changeset:
Modified: trunk/uClibc/libc/pwd_grp/pwd_grp.c
===================================================================
--- trunk/uClibc/libc/pwd_grp/pwd_grp.c	2005-09-21 23:18:07 UTC (rev 11543)
+++ trunk/uClibc/libc/pwd_grp/pwd_grp.c	2005-09-21 23:33:29 UTC (rev 11544)
@@ -41,7 +41,10 @@
 #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

Modified: trunk/uClibc/libc/unistd/getopt.c
===================================================================
--- trunk/uClibc/libc/unistd/getopt.c	2005-09-21 23:18:07 UTC (rev 11543)
+++ trunk/uClibc/libc/unistd/getopt.c	2005-09-21 23:33:29 UTC (rev 11544)
@@ -26,10 +26,13 @@
  * 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.

Modified: trunk/uClibc/libc/unistd/sysconf.c
===================================================================
--- trunk/uClibc/libc/unistd/sysconf.c	2005-09-21 23:18:07 UTC (rev 11543)
+++ trunk/uClibc/libc/unistd/sysconf.c	2005-09-21 23:33:29 UTC (rev 11544)
@@ -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!

Modified: trunk/uClibc/librt/kernel-posix-timers.h
===================================================================
--- trunk/uClibc/librt/kernel-posix-timers.h	2005-09-21 23:18:07 UTC (rev 11543)
+++ trunk/uClibc/librt/kernel-posix-timers.h	2005-09-21 23:33:29 UTC (rev 11544)
@@ -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 @@
     /* 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
 };




More information about the uClibc-cvs mailing list