This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug other/11673] libmudflap does not compile on freebsd


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11673



------- Additional Comments From lsjoberg at aland dot net  2003-07-25 22:48 -------
Subject: Re:  libmudflap does not compile on freebsd

>From types.h:
#ifndef _POSIX_SOURCE
typedef unsigned char   u_char;
typedef unsigned short  u_short;
(...)
#endif

Not much to do there...

The code compiles with _POSIX_SOURCE undefined (that's how I have been solving
the problem temporarly), so an ugly fix is something like
diff -u -u -r1.1.2.1 mf-hooks2.c
--- mf-hooks2.c 4 Jul 2003 23:10:09 -0000       1.1.2.1
+++ mf-hooks2.c 25 Jul 2003 18:30:05 -0000
@@ -11,7 +11,9 @@
 
 /* These attempt to coax various unix flavours to declare all our
    needed tidbits in the system headers.  */
+#ifndef _FREEBSD  /* Or some other magic that detects FreeBSD (prob. *BSD) */
 #define _POSIX_SOURCE
+#endif
 #define _GNU_SOURCE 
 #define _XOPEN_SOURCE
 #define _BSD_TYPES


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