55 lines
1.7 KiB
Text
55 lines
1.7 KiB
Text
$NetBSD: patch-ag,v 1.4 2006/02/25 17:31:57 schwarz Exp $
|
|
|
|
--- config/imake/imake.c.orig 2006-02-25 18:12:25.000000000 +0100
|
|
+++ config/imake/imake.c 2006-02-25 18:15:10.000000000 +0100
|
|
@@ -145,11 +145,13 @@
|
|
* #include INCLUDE_IMAKEFILE
|
|
* <add any global targets like 'clean' and long dependencies>
|
|
*/
|
|
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
|
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__) || defined(__DragonFly__) || defined(__sgi) || defined(sun) || defined(__sun)
|
|
/* This needs to be before _POSIX_SOURCE gets defined */
|
|
# include <sys/param.h>
|
|
# include <sys/types.h>
|
|
+# if !defined(__sgi) && !defined(sun) && !defined(__sun)
|
|
# include <sys/sysctl.h>
|
|
+# endif
|
|
# include <sys/stat.h>
|
|
#endif
|
|
#include <stdio.h>
|
|
@@ -281,7 +283,7 @@
|
|
* Xos.h, which we don't want to include here for bootstrapping reasons.
|
|
*/
|
|
#ifndef USE_STRERROR
|
|
-# ifndef strerror
|
|
+# if !defined(strerror) && !defined(sun) && !defined(__sun)
|
|
extern char *sys_errlist[];
|
|
extern int sys_nerr;
|
|
# define strerror(n) \
|
|
@@ -1028,7 +1030,7 @@
|
|
}
|
|
#endif
|
|
|
|
-#ifdef __FreeBSD__
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
static void
|
|
get_binary_format(FILE *inFile)
|
|
{
|
|
@@ -1064,7 +1066,7 @@
|
|
FILE* inFile;
|
|
{
|
|
static char* gcc_path[] = {
|
|
-#if defined(linux) || defined(__OpenBSD__)
|
|
+#if defined(linux) || defined(__OpenBSD__) || defined(__DragonFly__)
|
|
"/usr/bin/cc", /* for Linux PostIncDir */
|
|
#endif
|
|
"/usr/local/bin/gcc",
|
|
@@ -1161,7 +1163,7 @@
|
|
get_ld_version(inFile);
|
|
#endif
|
|
get_gcc_incdir(inFile);
|
|
-#ifdef __FreeBSD__
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
get_binary_format(inFile);
|
|
#endif
|
|
#endif /* WIN32 */
|