pkgsrc/lang/scm/patches/patch-ad
asau e04d67e7a1 Pull common standard definitions in one place.
Addresses PR 46496, inspired by original patch by Alexander Polakov.
2012-05-29 20:50:35 +00:00

77 lines
1.8 KiB
Text

$NetBSD: patch-ad,v 1.2 2012/05/29 20:50:35 asau Exp $
Pull common standard definitions in one place.
--- findexec.c.orig 2002-06-02 08:54:47.000000000 +0400
+++ findexec.c 2012-05-30 00:44:57.000000000 +0400
@@ -41,68 +41,22 @@
# ifndef PLAN9
# include <sys/file.h>
# include <sys/param.h>
-# endif
-# ifdef linux
-# include <stdlib.h>
+# include <sys/types.h>
# include <sys/stat.h>
-# include <unistd.h> /* for X_OK define */
-# endif
-# ifdef __SVR4
# include <string.h>
# include <stdlib.h>
-# include <sys/stat.h>
# include <unistd.h> /* for X_OK define */
-# else
-# ifdef __sgi__
-# include <string.h>
-# include <stdlib.h>
-# include <sys/stat.h>
-# include <unistd.h> /* for X_OK define */
-# else
+# endif
# ifdef PLAN9
# include <u.h>
# include <libc.h>
# define getcwd getwd
# define MAXPATHLEN 256 /* arbitrary? */
# define X_OK AEXEC
-# else
-# include <strings.h>
# endif
-# endif
-# endif
-# ifdef __amigaos__
-# include <stdlib.h>
-# include <sys/stat.h>
-# include <unistd.h>
-# endif
# ifndef __STDC__
# define const /**/
# endif
-# ifdef __FreeBSD__
-/* This might be same for 44bsd derived system. */
-# include <sys/types.h>
-# include <sys/stat.h>
-# endif
-# ifdef __NetBSD__
-# include <stdlib.h>
-# include <unistd.h>
-# endif
-# ifdef __OpenBSD__
-/* This might be same for 44bsd derived system. */
-# include <stdlib.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# endif
-# ifdef __alpha
-# include <string.h>
-# include <stdlib.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# endif
-# ifdef GO32
-# include <sys/stat.h>
-# endif
# ifndef DEFAULT_PATH
# define DEFAULT_PATH ".:~/bin::/usr/local/bin:/usr/new:/usr/ucb:/usr/bin:/bin:/usr/hosts"