Re: lib/csu cleanup - review please

"David O'Brien" <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Organization The NUXI BSD group
Message-ID <[email protected]>
Index: crt1.c
===================================================================
RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v
retrieving revision 1.7
diff -u -r1.7 crt1.c
--- crt1.c	29 Mar 2002 22:43:41 -0000	1.7
+++ crt1.c	25 Jun 2002 18:40:38 -0000
@@ -37,6 +37,7 @@
 extern void _fini(void);
 extern void _init(void);
 extern int main(int, char **, char **);
+extern void _start(char *, ...);
 
 #ifdef GCRT
 extern void _mcleanup(void);
@@ -48,14 +49,17 @@
 extern int _DYNAMIC;
 #pragma weak _DYNAMIC
 
-#ifdef __i386__
-#define get_rtld_cleanup()				\
-    ({ fptr __value;					\
-       __asm__("movl %%edx,%0" : "=rm"(__value));	\
-       __value; })
+static __inline fptr get_rtld_cleanup(void);
+__inline fptr get_rtld_cleanup() {
+	fptr __value;
+#ifdef __GNUC__
+	__asm__("movl %%edx,%0" : "=rm"(__value));
 #else
-#error "This file only supports the i386 architecture"
+#error "GCC is needed to compile this file"
+	__value = 0;	/* shut up lint */
 #endif
+	return __value;
+}
 
 char **environ;
 const char *__progname = "";

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.