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


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

PATCH: Fix dlfcn.h for C++.


This patch fixes dlfcn.h for C++.


H.J.
----
2001-10-24  H.J. Lu  <hjl@gnu.org>

	* dlfcn/dlfcn.h: Move __BEGIN_DECLS before <bits/dlfcn.h>.

	* sysdeps/generic/bits/dlfcn.h (DL_CALL_FCT): Cast to void *.
	* sysdeps/mips/bits/dlfcn.h (DL_CALL_FCT): Likewise.

--- libc/dlfcn/dlfcn.h.dlfcn	Sat Jul  7 16:44:44 2001
+++ libc/dlfcn/dlfcn.h	Wed Oct 24 10:20:24 2001
@@ -22,6 +22,8 @@
 
 #include <features.h>
 
+__BEGIN_DECLS
+
 /* Collect various system dependent definitions and declarations.  */
 #include <bits/dlfcn.h>
 
@@ -38,8 +40,6 @@
 # define RTLD_DEFAULT	((void *) 0)
 #endif
 
-__BEGIN_DECLS
-
 /* Open the shared object FILE and map it in; return a handle that can be
    passed to `dlsym' to get symbol values from it.  */
 extern void *dlopen (__const char *__file, int __mode) __THROW;
--- libc/sysdeps/generic/bits/dlfcn.h.dlfcn	Sat Jul  7 16:45:54 2001
+++ libc/sysdeps/generic/bits/dlfcn.h	Wed Oct 24 10:22:31 2001
@@ -52,7 +52,7 @@
         foo = DL_CALL_FCT (fctp, (arg1, arg2));
 */
 # define DL_CALL_FCT(fctp, args) \
-  (_dl_mcount_wrapper_check (fctp), (*(fctp)) args)
+  (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
 
 /* This function calls the profiling functions.  */
 extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
--- libc/sysdeps/mips/bits/dlfcn.h.dlfcn	Sat Jul  7 16:46:05 2001
+++ libc/sysdeps/mips/bits/dlfcn.h	Wed Oct 24 10:22:16 2001
@@ -52,7 +52,7 @@
         foo = DL_CALL_FCT (fctp, (arg1, arg2));
 */
 # define DL_CALL_FCT(fctp, args) \
-  (_dl_mcount_wrapper_check (fctp), (*(fctp)) args)
+  (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
 
 /* This function calls the profiling functions.  */
 extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;


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