diff options
author | LaMont Jones <lamont@debian.org> | 2003-05-07 08:36:40 -0600 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:27 -0800 |
commit | e21d47d7813159bb71e0671df9b52ec0470c358d (patch) | |
tree | 3c7770ea846123c291f599044e9f234ac17616bb /findexec.c | |
parent | 8cfce36c6a4fc2e0a0ab6ef2db66a23cbe462693 (diff) | |
parent | deda2c0fd8689349fea2a900199a76ff7ecb319e (diff) | |
download | scm-e21d47d7813159bb71e0671df9b52ec0470c358d.tar.gz scm-e21d47d7813159bb71e0671df9b52ec0470c358d.zip |
Import Debian changes 5d6-3.2debian/5d6-3.2
scm (5d6-3.2) unstable; urgency=low
* Fix hppa compile. Closes: #144062
scm (5d6-3.1) unstable; urgency=low
* NMU with patch from James Troup, to fix FTBFS on sparc. Closes: #191171
scm (5d6-3) unstable; urgency=low
* Add build depend on xlibs-dev (Closes: #148020)
scm (5d6-2) unstable; urgency=low
* Remove libregexx-dev from build-depends.
* Change build to use ./scmlit rather than scmlit (should fix some build
problems) (looks like alpha is mostly building)
* New release (Closes: #140175)
* Built with turtlegraphics last time (Closes: #58515)
scm (5d6-1) unstable; urgency=low
* New upstream.
* Add xlib and turtlegr to requested list of features. (closes
some bug)
* Make clean actually clean most everything up.
* Remove hacks renaming build to something else and just set build as a
.PHONY target in debian/rules.
* Add the turtlegr code.
scm (5d5-1) unstable; urgency=low
* New upstream
* Has fixes for 64 bit archs. May fix alpha compile problem. Does fix
(Closes: #140175)
* Take out -O2 arg.
scm (5d4-3) unstable; urgency=low
* Don't link with regexx, but just use libc6's regular expression
functions.
* Define (terms) to output /usr/share/common-licenses/GPL (Closes:
#119321)
scm (5d4-2) unstable; urgency=low
* Add texinfo to build depends (Closes: #107011)
scm (5d4-1) unstable; urgency=low
* New upstream release.
* Move install-info --remove to prerm.
scm (5d3-5) unstable; urgency=low
* Move scm info files to section "The Algorithmic Language Scheme" to
match up with guile.
scm (5d3-4) unstable; urgency=low
* Fix build depends (Closes: #76691)
scm (5d3-3) unstable; urgency=low
* Fix path in scm dhelp file.
scm (5d3-2) unstable; urgency=low
* Actually put the header files in the package. Oops.
scm (5d3-1) unstable; urgency=low
* New upstream. (Closes: #74761)
* Make (terms) use new license location.
* Make use libregexx rather than librx.
* Fix build depends for above.
* Using new regex lib seems to fix crash (Closes: #66787)
* Consider adding scm-dev package with headers, but instead just add the
headers to the scm package. (Closes: #70787)
* Add doc-base support.
Diffstat (limited to 'findexec.c')
-rw-r--r-- | findexec.c | 125 |
1 files changed, 74 insertions, 51 deletions
@@ -37,54 +37,72 @@ Wed Feb 21 23:06:35 1996 Aubrey Jaffer <jaffer@jacal.bertronics> filename. A new copy of the complete path name of that file is returned. This new string may be disposed by free() later on. */ -#include <sys/file.h> -#include <sys/param.h> -#ifdef linux -# include <stdlib.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__ +#ifndef __MINGW32__ +# ifndef PLAN9 +# include <sys/file.h> +# include <sys/param.h> +# endif +# ifdef linux +# include <stdlib.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 -# include <strings.h> +# ifdef __sgi__ +# include <string.h> +# include <stdlib.h> +# include <sys/stat.h> +# include <unistd.h> /* for X_OK define */ +# else +# 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 -#endif -#ifdef __amigados__ -# include <stdlib.h> -# include <sys/stat.h> -# include <unistd.h> -#endif -#ifndef __STDC__ -# define const /**/ -#endif -#ifdef __FreeBSD__ +# ifdef __OpenBSD__ /* This might be same for 44bsd derived system. */ -# 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" -#endif +# 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" +# endif static char *copy_of(s) register const char *s; @@ -97,12 +115,12 @@ static char *copy_of(s) } /* ABSOLUTE_FILENAME_P(fname): True if fname is an absolute filename */ -#ifdef atarist -# define ABSOLUTE_FILENAME_P(fname) ((fname[0] == '/') || \ +# ifdef atarist +# define ABSOLUTE_FILENAME_P(fname) ((fname[0] == '/') || \ (fname[0] && (fname[1] == ':'))) -#else -# define ABSOLUTE_FILENAME_P(fname) (fname[0] == '/') -#endif /* atarist */ +# else +# define ABSOLUTE_FILENAME_P(fname) (fname[0] == '/') +# endif /* atarist */ char *dld_find_executable(name) const char *name; @@ -155,16 +173,21 @@ char *dld_find_executable(name) strcat(tbuf, name); if (access(tbuf, X_OK) == 0) { -#ifndef hpux -# ifndef ultrix +# ifndef hpux +# ifndef ultrix +# ifndef __MACH__ +# ifndef PLAN9 struct stat stat_temp; - if (stat(tbuf,&stat_temp)) continue; + if (stat(tbuf, &stat_temp)) continue; if (S_IFREG != (S_IFMT & stat_temp.st_mode)) continue; -# endif/* ultrix */ -#endif /* hpux */ +# endif /* PLAN9 */ +# endif /* __MACH__ */ +# endif/* ultrix */ +# endif /* hpux */ return copy_of(tbuf); } } return 0; } +#endif /* ndef MSDOS */ |