summaryrefslogtreecommitdiff
path: root/misc/siag/patches/patch-aa
blob: fa94f9bef0b15bf69ae58bc7148598f1d900a95f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-aa,v 1.1.1.1 1998/12/04 03:48:34 hubertf Exp $

--- siod/slibu.c.orig	Thu Dec  3 04:26:29 1998
+++ siod/slibu.c	Thu Dec  3 05:04:41 1998
@@ -15,13 +15,15 @@
 #endif
 #endif
 
+#ifndef __NetBSD__
 #ifndef _XOPEN_SOURCE	/* and another */
-#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE 2
 #endif
 
 #ifndef _POSIX_SOURCE
 #define _POSIX_SOURCE
 #endif
+#endif /* __NetBSD__ */
 
 #ifndef _BSD_SOURCE
 #define _BSD_SOURCE
@@ -89,6 +91,10 @@
 #define PATH_MAX MAXPATHLEN
 #endif
 
+#if defined(__NetBSD__)
+#include <sys/syslimits.h>
+#endif
+
 #if defined(VMS)
 #include <unixlib.h>
 #include <stat.h>
@@ -276,6 +282,7 @@
  return(NIL);}
 #endif
 
+#ifndef __NetBSD__
 LISP lputpwent(LISP alist,LISP file)
 {int iflag = no_interrupt(1);
  int status;
@@ -284,6 +291,7 @@
  status = putpwent(&p,get_c_file(file,NULL));
  no_interrupt(iflag);
  return(NIL);}
+#endif
 
 LISP laccess_problem(LISP lfname,LISP lacc)
 {char *fname = get_c_string(lfname);
@@ -995,7 +1003,7 @@
  else
    return(NIL);}
 
-LISP lchmod(LISP path,LISP mode)
+LISP _lchmod(LISP path,LISP mode)
 {if (chmod(get_c_string(path),get_c_long(mode)))
    return(err("chmod",llast_c_errmsg(-1)));
  else
@@ -1954,10 +1962,12 @@
 #if defined(__osf__)
  init_subr_1("setpwfile",lsetpwfile);
 #endif
+#ifndef __NetBSD__
  init_subr_2("putpwent",lputpwent);
+#endif
  init_subr_2("access-problem?",laccess_problem);
  init_subr_3("utime",lutime);
- init_subr_2("chmod",lchmod);
+ init_subr_2("chmod",_lchmod);
  init_subr_2("fchmod",lfchmod);
 #endif
  init_subr_1("random",lrandom);