Norcroft report 2004-10-11
Stefan Bellon
sbellon at sbellon.de
Mon Oct 11 22:59:47 BST 2004
In order to compile UnixLib with Norcroft C, I need quite some patches,
and they get more over the time. Therefore I decided to post them here,
so that you can decide whether to include them into the main tree or
whether to go for another equivalent fix.
*cvs diff
Index: source/regex.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/regex.c,v
retrieving revision 1.5
diff -u -r1.5 regex.c
--- source/regex.c 12 Jun 2004 08:59:46 -0000 1.5
+++ source/regex.c 11 Oct 2004 21:57:02 -0000
@@ -38,8 +38,6 @@
#pragma alloca
#endif
-#define _GNU_SOURCE
-
/* We need this for `regex.h', and perhaps for the Emacs include
files. */
#include <sys/types.h>
Index: source/clib/string.h
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/clib/string.h,v
retrieving revision 1.12
diff -u -r1.12 string.h
--- source/clib/string.h 15 Apr 2004 22:21:02 -0000 1.12
+++ source/clib/string.h 11 Oct 2004 21:57:03 -0000
@@ -202,7 +202,7 @@
platforms. */
# ifdef __USE_GNU
extern int ffsl (long int __l) __THROW __attribute__ ((__const__));
-#define ffsl(x) ffs(x)
+//#define ffsl(x) ffs(x)
# ifdef __GNUC__
__extension__ extern int ffsll (long long int __ll)
Index: source/stdlib/realpath.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/stdlib/realpath.c,v
retrieving revision 1.4
diff -u -r1.4 realpath.c
--- source/stdlib/realpath.c 17 Mar 2004 20:00:51 -0000 1.4
+++ source/stdlib/realpath.c 11 Oct 2004 21:57:05 -0000
@@ -8,7 +8,6 @@
*
***************************************************************************/
-#define _GNU_SOURCE
#include <errno.h>
#include <stdlib.h>
#include <kernel.h>
Index: source/time/mktime.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/time/mktime.c,v
retrieving revision 1.5
diff -u -r1.5 mktime.c
--- source/time/mktime.c 8 Oct 2004 11:56:13 -0000 1.5
+++ source/time/mktime.c 11 Oct 2004 21:57:05 -0000
@@ -48,4 +48,4 @@
timelocal (struct tm *tm)
{
return mktime (tm);
-}
\ No newline at end of file
+}
Index: source/unistd/getpass.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/unistd/getpass.c,v
retrieving revision 1.3
diff -u -r1.3 getpass.c
--- source/unistd/getpass.c 21 Apr 2003 16:04:02 -0000 1.3
+++ source/unistd/getpass.c 11 Oct 2004 21:57:05 -0000
@@ -26,7 +26,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _GNU_SOURCE
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
Additionally, I had to comment out unix.c.fnmatch from the generated
Makefile as this source file doesn't compile anymore with Norcroft
since the latest change. I haven't had the time to track down the
reason.
--
Stefan Bellon
More information about the gcc
mailing list