View | Details | Raw Unified | Return to bug 162577 | Differences between
and this patch

Collapse All | Expand All

(-)b/Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
  PORTNAME=	caml
7
  PORTNAME=	caml
8
 PORTVERSION=	0.75
8
 PORTVERSION=	0.75
9
PORTREVISION=	3
9
PORTREVISION=	4
10
 CATEGORIES=	lang elisp
10
 CATEGORIES=	lang elisp
11
 MASTER_SITES=	http://caml.inria.fr/pub/distrib/caml-light-0.75/ \
11
 MASTER_SITES=	http://caml.inria.fr/pub/distrib/caml-light-0.75/ \
12
 	 
12
 	 
(-)b/files/patch-src_launch_Makefile (-9 / +14 lines)
Lines 1-13 Link Here
1
--- src/launch/Makefile.orig	Wed Feb 22 15:03:26 1995
1
--- src/launch/Makefile.orig	1995-02-22 10:33:26.000000000 +0100
2
+++ src/launch/Makefile	Sun Aug  6 11:58:56 2006
2
+++ src/launch/Makefile	2011-11-12 10:26:48.000000000 +0100
3
@@ -17,16 +17,17 @@
3
@@ -11,22 +11,15 @@
4
 	chmod a+x /tmp/testscr
4
 # have write permission in the current directory if NFS-mounted...
5
 	sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
5
 + install:
6
                then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \
6
-	(echo "#!$(BINDIR)/camlrun"; \
7
-	 echo "exit 2"; \
8
-	 cat testprog) > /tmp/testscr
9
-	chmod a+x /tmp/testscr
10
-	sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
11
-               then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \
7
 -               else cp camlexec $(LIBDIR)/header; \
12
 -               else cp camlexec $(LIBDIR)/header; \
8
+               else ${BSD_INSTALL_SCRIPT} camlexec $(LIBDIR)/header; \
13
-               fi'
9
                fi'
14
-	rm -f /tmp/testscr
10
 	rm -f /tmp/testscr
15
+	echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header
11
  	for script in camlc camllight camlmktop; do \
16
  	for script in camlc camllight camlmktop; do \
12
 -	  cp $$script $(BINDIR)/$$script; \
17
 -	  cp $$script $(BINDIR)/$$script; \
13
 +	  ${BSD_INSTALL_SCRIPT} $$script $(BINDIR)/$$script; \
18
 +	  ${BSD_INSTALL_SCRIPT} $$script $(BINDIR)/$$script; \
(-)b/files/patch-src_yacc_main.c (+71 lines)
Added Link Here
1
--- src/yacc/main.c.orig	1995-06-07 15:34:32.000000000 +0200
2
+++ src/yacc/main.c	2011-11-12 10:09:52.000000000 +0100
3
@@ -1,4 +1,5 @@
4
 #include <signal.h>
5
+#include <stdlib.h> /* for mkstemp(), getenv() */
6
 #include "defs.h"
7
 + char dflag;
8
@@ -31,6 +32,11 @@
9
 char *union_file_name;
10
 char *verbose_file_name;
11
 ++static int action_fd = -1;
12
+static int entry_fd = -1;
13
+static int text_fd = -1;
14
+static int union_fd = -1;
15
+
16
 FILE *action_file;	/*  a temp file, used to save actions associated    */
17
 			/*  with rules until the parser is written	    */
18
 FILE *entry_file;
19
@@ -72,7 +78,6 @@
20
 extern char *mktemp();
21
 extern char *getenv();
22
 +-
23
 done(k)
24
 int k;
25
 {
26
@@ -276,11 +281,20 @@
27
     union_file_name[len + 5] = 'u';
28
 + #ifndef NO_UNIX
29
-    mktemp(action_file_name);
30
-    mktemp(entry_file_name);
31
-    mktemp(text_file_name);
32
-    mktemp(union_file_name);
33
+    action_fd = mkstemp(action_file_name);
34
+    entry_fd = mkstemp(entry_file_name);
35
+    text_fd = mkstemp(text_file_name);
36
+    union_fd = mkstemp(union_file_name);
37
 #endif
38
+    if (action_fd < 0)
39
+	open_error(action_file_name);
40
+    if (entry_fd < 0)
41
+	open_error(entry_file_name);
42
+    if (text_fd < 0)
43
+	open_error(text_file_name);
44
+    if (union_fd < 0)
45
+	open_error(union_file_name);
46
+
47
 +     len = strlen(file_prefix);
48
 +@@ -321,15 +335,15 @@
49
 	    open_error(input_file_name);
50
     }
51
 +-    action_file = fopen(action_file_name, "w");
52
+    action_file = fdopen(action_fd, "w");
53
     if (action_file == 0)
54
 	open_error(action_file_name);
55
 +-    entry_file = fopen(entry_file_name, "w");
56
+    entry_file = fdopen(entry_fd, "w");
57
     if (entry_file == 0)
58
 	open_error(entry_file_name);
59
 +-    text_file = fopen(text_file_name, "w");
60
+    text_file = fdopen(text_fd, "w");
61
     if (text_file == 0)
62
 	open_error(text_file_name);
63
 +@@ -345,7 +359,7 @@
64
 	defines_file = fopen(defines_file_name, "w");
65
 	if (defines_file == 0)
66
 	    open_error(defines_file_name);
67
-	union_file = fopen(union_file_name, "w");
68
+	union_file = fdopen(union_fd, "w");
69
 	if (union_file ==  0)
70
 	    open_error(union_file_name);
71
     }

Return to bug 162577