Browse Source

Enable __THROW,_NTH,REDIRECT_NTH

Peter S. Mazinger 18 years ago
parent
commit
5c41b5d413

+ 2 - 0
include/malloc.h

@@ -64,11 +64,13 @@
 /* GCC can always grok prototypes.  For C++ programs we add throw()
 /* GCC can always grok prototypes.  For C++ programs we add throw()
    to help it optimize the function calls.  But this works only with
    to help it optimize the function calls.  But this works only with
    gcc 2.8.x and egcs.  */
    gcc 2.8.x and egcs.  */
+#ifndef __THROW
 # if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8)
 # if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8)
 #  define __THROW	throw ()
 #  define __THROW	throw ()
 # else
 # else
 #  define __THROW
 #  define __THROW
 # endif
 # endif
+#endif
 # define __MALLOC_P(args)	args __THROW
 # define __MALLOC_P(args)	args __THROW
 /* This macro will be used for functions which might take C++ callback
 /* This macro will be used for functions which might take C++ callback
    functions.  */
    functions.  */

+ 1 - 4
include/sys/cdefs.h

@@ -42,7 +42,7 @@
    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
    the -fexceptions options for C code as well.  */
-# if 0 //!defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
 #  define __THROW	__attribute__ ((__nothrow__))
 #  define __THROW	__attribute__ ((__nothrow__))
 #  define __NTH(fct)	__attribute__ ((__nothrow__)) fct
 #  define __NTH(fct)	__attribute__ ((__nothrow__)) fct
 # else
 # else
@@ -164,8 +164,6 @@
 #if defined __GNUC__ && __GNUC__ >= 2
 #if defined __GNUC__ && __GNUC__ >= 2
 
 
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
-# define __ASMNAME(cname) __C_SYMBOL_PREFIX__ cname
-/*
 # ifdef __cplusplus
 # ifdef __cplusplus
 #  define __REDIRECT_NTH(name, proto, alias) \
 #  define __REDIRECT_NTH(name, proto, alias) \
      name proto __THROW __asm__ (__ASMNAME (#alias))
      name proto __THROW __asm__ (__ASMNAME (#alias))
@@ -175,7 +173,6 @@
 # endif
 # endif
 # define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
 # define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
 # define __ASMNAME2(prefix, cname) __STRING (prefix) cname
 # define __ASMNAME2(prefix, cname) __STRING (prefix) cname
-*/
 
 
 /*
 /*
 #elif __SOME_OTHER_COMPILER__
 #elif __SOME_OTHER_COMPILER__

+ 1 - 1
libpthread/linuxthreads.old/specific.c

@@ -200,5 +200,5 @@ libc_internal_tsd_address (enum __libc_tsd_key_t key)
     return &self->p_libc_specific[key];
     return &self->p_libc_specific[key];
 }
 }
 void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t key)
 void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t key)
-     __THROW __attribute__ ((__const__)) = libc_internal_tsd_address;
+     __attribute__ ((__const__)) = libc_internal_tsd_address;
 #endif
 #endif

+ 3 - 4
libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h

@@ -40,11 +40,10 @@ enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
 
 
 #else
 #else
 
 
-extern void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t) __THROW;
-extern int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t,
-				       __const void *)  __THROW;
+extern void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t);
+extern int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t, __const void *);
 extern void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t)
 extern void **(*const __libc_internal_tsd_address) (enum __libc_tsd_key_t)
-     __THROW __attribute__ ((__const__));
+     __attribute__ ((__const__));
 
 
 #define __libc_tsd_address(KEY) \
 #define __libc_tsd_address(KEY) \
   (__libc_internal_tsd_address != NULL \
   (__libc_internal_tsd_address != NULL \