Browse Source

s/UCLIBC_INTERNAL/_LIBC/g

Undo my old mistake. I added UCLIBC_INTERNAL define,
but later I realized _LIBC is doing exactly the same thing.

This change converts all usages of UCLIBC_INTERNAL to _LIBC,
removing all instances of UCLIBC_INTERNAL.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko 15 years ago
parent
commit
4a2724d93b

+ 1 - 5
Rules.mak

@@ -58,7 +58,7 @@ AWK        = awk
 STRIP_FLAGS ?= -x -R .note -R .comment
 
 ## unused? if yes, remove after 0.9.31
-## UNIFDEF := $(top_builddir)extra/scripts/unifdef -UUCLIBC_INTERNAL
+## UNIFDEF := $(top_builddir)extra/scripts/unifdef
 
 # Select the compiler needed to build binaries for your development system
 HOSTCC     = gcc
@@ -536,10 +536,6 @@ ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
 CFLAGS += $(subst ",, $(UCLIBC_EXTRA_CFLAGS))
 endif
 
-# Please let us see private headers' parts
-# Deprecated: _LIBC serves the same purpose
-CFLAGS += -DUCLIBC_INTERNAL
-
 # We need this to be checked within libc-symbols.h
 ifneq ($(HAVE_SHARED),y)
 CFLAGS += -DSTATIC

+ 2 - 5
docs/defines.txt

@@ -56,11 +56,8 @@ internal_function
 	int internal_function func(params) { body }
 
 _LIBC
-UCLIBC_INTERNAL
-    Defined only at libc build time. _LIBC is probably from glibc,
-and UCLIBC_INTERNAL is added by vda (he didn't know about _LIBC).
-Both defines are physically deleted from headers (using unifdef tool)
-in installed headers ("make install").
+    Defined only at libc build time. It is physically deleted
+from the headers (using unifdef tool) in installed headers ("make install").
 
 __UCLIBC_XXX
     uclibc-internal and uclibc-specific defines. In particular:

+ 0 - 1
extra/scripts/install_headers.sh

@@ -52,7 +52,6 @@ while read -r filename; do
 	# Do not abort the script if unifdef "fails"!
 	# NB2: careful with sed command arguments, they contain tab character
 	"$top_builddir/extra/scripts/unifdef" \
-		-UUCLIBC_INTERNAL \
 		-U_LIBC \
 		-U__UCLIBC_GEN_LOCALE \
 		-U__NO_CTYPE \

+ 1 - 1
include/features.h

@@ -34,7 +34,7 @@
 #define __need_uClibc_config_h
 #include <bits/uClibc_config.h>
 #undef __need_uClibc_config_h
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #include <bits/uClibc_arch_features.h>
 #endif
 

+ 4 - 4
include/printf.h

@@ -41,7 +41,7 @@ __BEGIN_DECLS
  * need to support bitfields since that's what glibc made visible to users.
  * So, we take
  * advantage of how gcc lays out bitfields to create an appropriate
- * mapping.  Inside uclibc (UCLIBC_INTERNAL is defined) we access the
+ * mapping.  Inside uclibc (i.e. if _LIBC is defined) we access the
  * bitfields using bitmasks in a single flag variable.
  *
  * WARNING -- This may very well fail if built with -fpack-struct!!!
@@ -61,7 +61,7 @@ struct printf_info {
   int spec;
 #endif
 
-#ifndef UCLIBC_INTERNAL
+#ifndef _LIBC
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
   unsigned int space:1;         /* Space flag.  */
@@ -95,7 +95,7 @@ struct printf_info {
 #error unsupported byte order!
 #endif
 
-#else  /* UCLIBC_INTERNAL */
+#else  /* _LIBC */
 
   uint32_t _flags;	/* non-gnu */
 #define __PRINT_INFO_FLAG_space                 (1<<0)
@@ -121,7 +121,7 @@ struct printf_info {
 #define PRINT_INFO_SET_extra(INFO_PTR,VAL) \
 	((INFO_PTR)->_flags |= (((INFO_PTR)->_flags & ~1) | ((VAL) & 1)))
 
-#endif /* UCLIBC_INTERNAL */
+#endif /* _LIBC */
 
 #ifdef __UCLIBC_HAS_WCHAR__
   wchar_t pad;                  /* Padding character.  */

+ 1 - 1
include/rpc/clnt.h

@@ -133,7 +133,7 @@ typedef struct CLIENT CLIENT;
 struct CLIENT {
   AUTH	*cl_auth;		 /* authenticator */
   /* not sure whether non-const-ness is a part of the spec... if it is,
-   * enclose "const" in #ifdef UCLIBC_INTERNAL / #endif
+   * enclose "const" in #ifdef _LIBC / #endif
    * to make it effective only for libc compile */
   const
   struct clnt_ops {

+ 1 - 1
include/string.h

@@ -483,7 +483,7 @@ libc_hidden_proto(strlcpy)
 __END_DECLS
 
 
-#if defined(UCLIBC_INTERNAL) && defined(__UCLIBC_HAS_STRING_ARCH_OPT__)
+#if defined(_LIBC) && defined(__UCLIBC_HAS_STRING_ARCH_OPT__)
 # if defined __i386__
 #  include <../libc/string/i386/string.h>
 # endif

+ 1 - 1
include/strings.h

@@ -91,7 +91,7 @@ extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
 __END_DECLS
 
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #error "<strings.h> should not be included from libc."
 #endif
 

+ 2 - 2
include/unistd.h

@@ -908,7 +908,7 @@ extern int sethostname (__const char *__name, size_t __len)
    This call is restricted to the super-user.  */
 extern int sethostid (long int __id) __THROW __wur;
 
-#if defined __UCLIBC_BSD_SPECIFIC__ || defined UCLIBC_INTERNAL
+#if defined __UCLIBC_BSD_SPECIFIC__ || defined _LIBC
 /* 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.  */
@@ -1174,7 +1174,7 @@ extern char *ctermid (char *__s) __THROW;
 __END_DECLS
 
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #ifndef smallint_type /* if arch didn't override it in bits/wordsize.h */
 #define smallint_type int
 #endif

+ 2 - 2
libc/sysdeps/linux/common/bits/types.h

@@ -29,7 +29,7 @@
 
 #define __need_size_t
 #include <stddef.h>
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #include <bits/kernel_types.h>
 #endif
 
@@ -200,7 +200,7 @@ __STD_TYPE __U32_TYPE __socklen_t;
 
 #undef __STD_TYPE
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 /* Used in `struct shmid_ds'.  */
 typedef __kernel_ipc_pid_t __ipc_pid_t;
 #endif

+ 1 - 1
libc/sysdeps/linux/i386/bits/wordsize.h

@@ -18,7 +18,7 @@
 
 #define __WORDSIZE	32
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #ifndef smallint_type
 #define smallint_type char
 #endif