This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Use __NO_INLINE__ checks in glibc headers (take 2)


On Sat, May 05, 2001 at 05:48:10PM +0200, Andreas Jaeger wrote:
> IMO that variant would be the cleaner solution,

Here it is:

2001-05-05  Jakub Jelinek  <jakub@redhat.com>

	* include/features.h (__USE_EXTERN_INLINES): Don't define if
	__NO_INLINE__ is defined.
	* ctype/ctype.h (tolower, toupper): Change the guard condition to
	__USE_EXTERN_INLINES check only.
	* stdlib/stdlib.h (strtod, ...): Likewise.
	* wcsmbs/wchar (mbrlen): Likewise.
	* string/string.h: Only include bits/string.h and bits/string2.h
	if __NO_INLINE__ is not defined.

--- libc/ctype/ctype.h.jj	Thu Sep 14 09:09:36 2000
+++ libc/ctype/ctype.h	Sat May  5 19:41:49 2001
@@ -163,8 +163,7 @@ __exctype (_tolower);
 #  define isblank(c)	__isctype((c), _ISblank)
 # endif
 
-# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
- && defined __USE_EXTERN_INLINES
+# ifdef __USE_EXTERN_INLINES
 extern __inline int
 tolower (int __c) __THROW
 {
--- libc/include/features.h.jj	Thu Nov  9 10:09:04 2000
+++ libc/include/features.h	Sat May  5 15:53:53 2001
@@ -293,7 +293,8 @@
 #endif	/* !ASSEMBLER */
 
 /* Decide whether we can define 'extern inline' functions in headers.  */
-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
+    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
 # define __USE_EXTERN_INLINES	1
 #endif
 
--- libc/stdlib/stdlib.h.jj	Thu Feb  8 13:20:28 2001
+++ libc/stdlib/stdlib.h	Sat May  5 19:42:21 2001
@@ -287,8 +287,7 @@ extern unsigned long long int __strtoull
 # endif
 #endif /* GCC */
 
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
-    && defined __USE_EXTERN_INLINES
+#ifdef __USE_EXTERN_INLINES
 /* Define inline functions which call the internal entry points.  */
 
 extern __inline double
--- libc/string/string.h.jj	Tue Apr 17 23:58:43 2001
+++ libc/string/string.h	Sat May  5 15:53:11 2001
@@ -333,7 +333,8 @@ extern char *basename (__const char *__f
 
 
 #if defined __GNUC__ && __GNUC__ >= 2
-# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined __cplusplus
+# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
+     && !defined __NO_INLINE__ && !defined __cplusplus
 /* When using GNU CC we provide some optimized versions of selected
    functions from this header.  There are two kinds of optimizations:
 
--- libc/wcsmbs/wchar.h.jj	Tue Apr 17 23:59:00 2001
+++ libc/wcsmbs/wchar.h	Sat May  5 19:42:46 2001
@@ -284,8 +284,7 @@ extern size_t __mbrlen (__const char *__
 extern size_t mbrlen (__const char *__restrict __s, size_t __n,
 		      mbstate_t *__restrict __ps) __THROW;
 
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
-    && defined __USE_EXTERN_INLINES
+#ifdef __USE_EXTERN_INLINES
 /* Define inline function as optimization.  */
 extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
 			       mbstate_t *__restrict __ps) __THROW


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]