summaryrefslogtreecommitdiff
path: root/devel/cdecl/files/patch-02
blob: c36d720197d02d8e1f4a548b1ecb38b8902a65f7 (plain) (blame)
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
--- cdecl.c.orig	Mon Jan 15 19:54:46 1996
+++ cdecl.c	Sat Aug 11 21:12:11 2001
@@ -63,10 +63,16 @@
 #include <stdio.h>
 #include <ctype.h>
 #if __STDC__ || defined(DOS)
+# if (defined(__unix__) || defined(unix)) && !defined(USG)
+#  include <sys/param.h>
+# endif
 # include <stdlib.h>
 # include <stddef.h>
 # include <string.h>
 # include <stdarg.h>
+# ifndef DOS
+#  include <errno.h>  /* only M$-DOS environments have ``errno'' in stdlib.h */
+# endif /* ndef DOS */
 #else
 # ifndef NOVARARGS
 #  include <varargs.h>
@@ -138,7 +145,9 @@
   void docast(char*, char*, char*, char*);
   void dodexplain(char*, char*, char*, char*);
   void docexplain(char*, char*, char*, char*);
+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019)
   void setprogname(char *);
+#endif
   int dotmpfile(int, char**), dofileargs(int, char**);
 #else
   char *ds(), *cat(), *visible();
@@ -148,7 +157,9 @@
   void unsupp(), notsupported();
   void yyerror();
   void doset(), dodeclare(), docast(), dodexplain(), docexplain();
+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019)
   void setprogname();
+#endif
   int dotmpfile(), dofileargs();
 #endif /* __STDC__ */
   FILE *tmpfile();
@@ -802,6 +813,7 @@
 #endif
 }
 
+#if __FreeBSD_version < 430001 || (__FreeBSD_version  >= 500000 && __FreeBSD_version < 500019)
 /* Save away the name of the program from argv[0] */
 void setprogname(argv0)
 char *argv0;
@@ -841,6 +853,7 @@
 	real_prompt[len+2] = '\0';
     }
 }
+#endif
 
 /* Run down the list of keywords to see if the */
 /* program is being called named as one of them */