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: revert RUN_HOOK changes for BPs


These changes didn't do what I wanted, so I took them out and
instead added an __unbounded qualifier.

No build regressions.  No non-BP binary changes.

OK?

2000-07-15  Greg McGary  <greg@mcgary.org>

	* include/libc-symbols.h (symbol_set_declare): Revert 2000-06-26 mods.
	* include/set-hooks.h (RUN_HOOK): Revert 2000-06-26 mods.  Qualify
	ptr as __unbouned.

Index: include/libc-symbols.h
===================================================================
RCS file: /cvs/glibc/libc/include/libc-symbols.h,v
retrieving revision 1.17
diff -u -p -r1.17 libc-symbols.h
--- libc-symbols.h	2000/07/11 19:30:52	1.17
+++ libc-symbols.h	2000/07/16 05:35:27
@@ -242,8 +242,8 @@
 
 /* Declare SET for use in this module, if defined in another module.  */
 #  define symbol_set_declare(set) \
-  extern void (*const __start_##set) (void) __attribute__ ((__weak__));	\
-  extern void (*const __stop_##set) (void) __attribute__ ((__weak__));	\
+  extern void *const __start_##set __attribute__ ((__weak__));		\
+  extern void *const __stop_##set __attribute__ ((__weak__));		\
   weak_extern (__start_##set) weak_extern (__stop_##set)
 
 /* Return a pointer (void *const *) to the first element of SET.  */
@@ -261,7 +261,7 @@
   asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
 #  define bss_set_element(set, symbol)	?error Must use initialized data.
 #  define symbol_set_define(set)	void *const (set)[1];
-#  define symbol_set_declare(set)	extern void (*const (set)[1]) (void);
+#  define symbol_set_declare(set)	extern void *const (set)[1];
 
 #  define symbol_set_first_element(set)	&(set)[1]
 #  define symbol_set_end_p(set, ptr)	(*(ptr) == 0)
Index: include/set-hooks.h
===================================================================
RCS file: /cvs/glibc/libc/include/set-hooks.h,v
retrieving revision 1.3
diff -u -p -r1.3 set-hooks.h
--- set-hooks.h	2000/06/27 01:20:02	1.3
+++ set-hooks.h	2000/07/16 05:35:27
@@ -40,12 +40,12 @@
 /* Run all the functions hooked on the set called NAME.
    Each function is called like this: `function ARGS'.  */
 
-# define RUN_HOOK(NAME, ARGS) \
-do {									   \
-  void (*const *ptr) (void);						   \
-  for (ptr = symbol_set_first_element (NAME);				   \
-       ! symbol_set_end_p (NAME, ptr); ++ptr)				   \
-    (*(__##NAME##_hook_function_t *) *ptr) ARGS;			   \
+# define RUN_HOOK(NAME, ARGS)				\
+do {							\
+  void *const *__unbounded ptr;				\
+  for (ptr = symbol_set_first_element (NAME);		\
+       ! symbol_set_end_p (NAME, ptr); ++ptr)		\
+    (*(__##NAME##_hook_function_t *) *ptr) ARGS;	\
 } while (0)
 
 /* Define a hook variable with NAME and PROTO, and a function called RUNNER

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