svn commit: trunk/uClibc: include libc/sysdeps/linux/common

aldot at uclibc.org aldot at uclibc.org
Fri Feb 13 15:35:26 UTC 2009


Author: aldot
Date: 2009-02-13 15:35:26 +0000 (Fri, 13 Feb 2009)
New Revision: 25325

Log:
- repair my r25322 that ment to deal with getdomainname()'s visibility


Modified:
   trunk/uClibc/include/unistd.h
   trunk/uClibc/libc/sysdeps/linux/common/getdomainname.c


Changeset:
Modified: trunk/uClibc/include/unistd.h
===================================================================
--- trunk/uClibc/include/unistd.h	2009-02-13 15:22:47 UTC (rev 25324)
+++ trunk/uClibc/include/unistd.h	2009-02-13 15:35:26 UTC (rev 25325)
@@ -908,16 +908,15 @@
    This call is restricted to the super-user.  */
 extern int sethostid (long int __id) __THROW __wur;
 
-#if defined __UCLIBC_BSD_SPECIFIC__
-# if defined UCLIBC_INTERNAL
-/* separate preprocessor test for unifdef */
+#if defined __UCLIBC_BSD_SPECIFIC__ || defined UCLIBC_INTERNAL
 /* Get and set the NIS (aka YP) domain name, if any.
    Called just like `gethostname' and `sethostname'.
    The NIS domain name is usually the empty string when not using NIS.  */
 extern int getdomainname (char *__name, size_t __len)
      __THROW __nonnull ((1)) __wur;
-# endif
 libc_hidden_proto(getdomainname)
+#endif
+#if defined __UCLIBC_BSD_SPECIFIC__
 extern int setdomainname (__const char *__name, size_t __len)
      __THROW __nonnull ((1)) __wur;
 #endif

Modified: trunk/uClibc/libc/sysdeps/linux/common/getdomainname.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/getdomainname.c	2009-02-13 15:22:47 UTC (rev 25324)
+++ trunk/uClibc/libc/sysdeps/linux/common/getdomainname.c	2009-02-13 15:35:26 UTC (rev 25325)
@@ -16,7 +16,11 @@
 /* Experimentally off - libc_hidden_proto(strcpy) */
 /* libc_hidden_proto(uname) */
 
-int getdomainname(char *name, size_t len)
+int
+#ifndef __UCLIBC_BSD_SPECIFIC__
+attribute_hidden
+#endif
+getdomainname(char *name, size_t len)
 {
   struct utsname uts;
 
@@ -42,7 +46,7 @@
 #endif
   return 0;
 }
-#ifdef __UCLIBC_BSD_SPECIFIC__
+# ifdef __UCLIBC_BSD_SPECIFIC__
 libc_hidden_def(getdomainname)
+# endif
 #endif
-#endif



More information about the uClibc-cvs mailing list