118 lines
3.2 KiB
Text
118 lines
3.2 KiB
Text
$NetBSD: patch-ab,v 1.2 2002/08/12 16:21:13 agc Exp $
|
|
|
|
Solaris (2.6 and above) already has usleep()
|
|
|
|
Add *BSD defs
|
|
|
|
Work around lchmod function and syscall clash.
|
|
|
|
Work around missing putpwent on NetBSD.
|
|
|
|
--- slibu.c 1999/08/06 09:27:05 1.1
|
|
+++ slibu.c 1999/08/06 09:28:11
|
|
@@ -29,6 +29,7 @@
|
|
#include <sys/stat.h>
|
|
#include <sys/time.h>
|
|
#include <sys/resource.h>
|
|
+#include <sys/param.h>
|
|
#include <grp.h>
|
|
#include <utime.h>
|
|
#include <sys/fcntl.h>
|
|
@@ -38,7 +39,7 @@
|
|
#include <sys/mode.h>
|
|
#endif
|
|
|
|
-#if defined(__osf__) || defined(SUN5)
|
|
+#if defined(__osf__) || defined(SUN5) || (defined(BSD) && BSD >= 199306)
|
|
#include <fnmatch.h>
|
|
#endif
|
|
|
|
@@ -50,7 +51,7 @@
|
|
#include <dl.h>
|
|
#endif
|
|
|
|
-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi)
|
|
+#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306)
|
|
#include <dlfcn.h>
|
|
#endif
|
|
|
|
@@ -288,6 +289,7 @@
|
|
return(NIL);}
|
|
#endif
|
|
|
|
+#if !(defined(BSD) && BSD >= 199506)
|
|
LISP lputpwent(LISP alist,LISP file)
|
|
{int iflag = no_interrupt(1);
|
|
int status;
|
|
@@ -296,6 +298,7 @@
|
|
status = putpwent(&p,get_c_file(file,NULL));
|
|
no_interrupt(iflag);
|
|
return(NIL);}
|
|
+#endif /* !BSD */
|
|
|
|
LISP laccess_problem(LISP lfname,LISP lacc)
|
|
{char *fname = get_c_string(lfname);
|
|
@@ -1021,7 +1024,7 @@
|
|
|
|
#if defined(unix) || defined(WIN32)
|
|
|
|
-LISP lchmod(LISP path,LISP mode)
|
|
+LISP lispchmod(LISP path,LISP mode)
|
|
{if (chmod(get_c_string(path),get_c_long(mode)))
|
|
return(err("chmod",llast_c_errmsg(-1)));
|
|
else
|
|
@@ -1311,7 +1314,7 @@
|
|
}
|
|
#endif
|
|
|
|
-#if defined(sun) || defined(sgi)
|
|
+#if (defined(sun) && !defined(__svr4__)) || defined(sgi)
|
|
long usleep(unsigned int winks)
|
|
{struct timespec x;
|
|
x.tv_sec = winks / 1000000;
|
|
@@ -1554,7 +1557,7 @@
|
|
/* note: error cases can leak memory in this procedure. */
|
|
{LISP init_name;
|
|
void (*fcn)(void) = NULL;
|
|
-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi)
|
|
+#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306)
|
|
void *handle;
|
|
#endif
|
|
#if defined(hpux)
|
|
@@ -1575,7 +1578,7 @@
|
|
{put_st("so-loading ");
|
|
put_st(get_c_string(fname));
|
|
put_st("\n");}
|
|
-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi)
|
|
+#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306)
|
|
#if !defined(__osf__)
|
|
/* Observed bug: values of LD_LIBRARY_PATH established with putenv
|
|
-after- a process has started are ignored. Work around follows. */
|
|
@@ -2163,7 +2166,7 @@
|
|
opendir_gc_free,
|
|
&j);
|
|
set_print_hooks(tc_opendir,opendir_prin1);
|
|
- init_subr_2("chmod",lchmod);
|
|
+ init_subr_2("chmod",lispchmod);
|
|
#endif
|
|
|
|
gc_protect_sym(&sym_channels,"*channels*");
|
|
@@ -2197,7 +2200,9 @@
|
|
#if defined(__osf__)
|
|
init_subr_1("setpwfile",lsetpwfile);
|
|
#endif
|
|
+#if !(defined(BSD) && BSD >= 199306)
|
|
init_subr_2("putpwent",lputpwent);
|
|
+#endif
|
|
init_subr_2("access-problem?",laccess_problem);
|
|
init_subr_3("utime",lutime);
|
|
init_subr_2("fchmod",lfchmod);
|
|
@@ -2262,7 +2267,7 @@
|
|
init_subr_1("encode-open-flags",encode_open_flags);
|
|
init_subr_1("lstat",l_lstat);
|
|
#endif
|
|
-#if defined(__osf__) || defined(SUN5)
|
|
+#if defined(__osf__) || defined(SUN5) || (defined(BSD) && BSD >= 199306)
|
|
init_subr_3("fnmatch",l_fnmatch);
|
|
#endif
|
|
#ifdef unix
|