[PATCH] bits/errno.h fix for g++

Jakub Jelinek jakub@redhat.com
Tue Dec 7 12:46:00 GMT 1999


Hi!

g++ (have checked egcs 1.1.2 and gcc 2.96) is picky about the exact position
of throw() and __attribute__, so this is needed:

1999-12-07  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/bits/errno.h (__errno_location): __THROW
	has to preceede __attribute__, otherwise g++ barfs.

--- sysdeps/unix/sysv/linux/bits/errno.h.jj	Tue Oct 19 05:05:05 1999
+++ sysdeps/unix/sysv/linux/bits/errno.h	Tue Dec  7 21:30:26 1999
@@ -36,7 +36,7 @@
 extern int errno;
 
 /* Function to get address of global `errno' variable.  */
-extern int *__errno_location (void) __attribute__ ((__const__)) __THROW;
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));
 
 #  if defined _LIBC
 /* We wouldn't need a special macro anymore but it is history.  */

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________


More information about the Libc-hacker mailing list