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]
Other format: [Raw text]

[PATCH] glibc-2.2.94 _exit.c fix for alpha


Aloha,

The appended patch fixes a build problem on alphaev56-pc-linux.  It follows
how other files (e.g. sysdeps/generic/abort.c) include <abort-instr.h>
and also includes <errno.h> since many implementations of INLINE_SYSCALL
refer to __set_errno().  I think powerpc includes <errno.h> from its <sysdep.h>
but other platforms don't and there are other files which include <errno.h>
without directly referring to anything defined in it.


2002-09-19  Glen Nakamura  <glen@imodulo.com>

	* sysdeps/unix/sysv/linux/_exit.c (ABORT_INSTRUCTION): Define empty
	macro for platforms without abort-instr.h.
	Include <errno.h> for INLINE_SYSCALLs which use __set_errno().

Index: _exit.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/_exit.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 _exit.c
--- _exit.c	16 Sep 2002 04:52:39 -0000	1.2
+++ _exit.c	20 Sep 2002 03:39:15 -0000
@@ -18,8 +18,16 @@
 
 #include <stdlib.h>
 #include <unistd.h>
+#include <errno.h>
 #include <sysdep.h>
+
+/* Try to get a machine dependent instruction which will make the
+   program crash.  This is used in case everything else fails.  */
 #include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+/* No such instruction is available.  */
+# define ABORT_INSTRUCTION
+#endif
 
 
 void


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