forgotten commit. disabled until egl is adapted.
[AROS-Contrib.git] / gnu / tar / tar-1.26-aros.diff
blob70a763221b7d486d9101df361515ad3ddc75bede
1 diff -ur tar-1.26.orig//gnu/fcntl.c tar-1.26/gnu/fcntl.c
2 --- tar-1.26.orig//gnu/fcntl.c 2011-03-12 04:14:28.000000000 -0500
3 +++ tar-1.26/gnu/fcntl.c 2011-12-10 12:13:00.000000000 -0500
4 @@ -34,6 +34,15 @@
5 #endif
6 #undef fcntl
8 +#ifdef __AROS__
9 +/* This is needed due to the conflicting version
10 + * of getdtablesize from bsdsocket.library, which
11 + * only counts the number of socket descriptors.
12 + */
13 +#undef getdtablesize
14 +#define getdtablesize() 256
15 +#endif
17 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18 /* Get declarations of the Win32 API functions. */
19 # define WIN32_LEAN_AND_MEAN
20 diff -ur tar-1.26.orig//lib/rtapelib.c tar-1.26/lib/rtapelib.c
21 --- tar-1.26.orig//lib/rtapelib.c 2010-09-14 06:06:44.000000000 -0400
22 +++ tar-1.26/lib/rtapelib.c 2011-03-12 04:50:18.000000000 -0500
23 @@ -97,7 +97,7 @@
25 /* If true, always consider file names to be local, even if they contain
26 colons */
27 -bool force_local_option;
28 +bool force_local_option = true;
32 @@ -424,10 +424,12 @@
36 +#ifndef __AROS__
37 /* FIXME: Should somewhat validate the decoding, here. */
38 if (gethostbyname (remote_host) == NULL)
39 error (EXIT_ON_EXEC_ERROR, 0, _("Cannot connect to %s: resolve failed"),
40 remote_host);
41 +#endif
43 if (remote_user && *remote_user == '\0')
44 remote_user = 0;
45 @@ -477,7 +479,7 @@
46 return -1;
49 - status = fork ();
50 + status = vfork ();
51 if (status == -1)
53 int e = errno;
54 diff -ur tar-1.26.orig//src/misc.c tar-1.26/src/misc.c
55 --- tar-1.26.orig//src/misc.c 2011-02-16 17:12:16.000000000 -0500
56 +++ tar-1.26/src/misc.c 2011-03-12 04:50:18.000000000 -0500
57 @@ -866,7 +866,7 @@
58 pid_t
59 xfork (void)
61 - pid_t p = fork ();
62 + pid_t p = vfork ();
63 if (p == (pid_t) -1)
64 call_arg_fatal ("fork", _("child process"));
65 return p;
66 @@ -899,7 +899,7 @@
67 void *
68 page_aligned_alloc (void **ptr, size_t size)
70 - size_t alignment = getpagesize ();
71 + size_t alignment = 2048;
72 size_t size1 = size + alignment;
73 if (size1 < size)
74 xalloc_die ();
75 diff -ur tar-1.26.orig//src/system.c tar-1.26/src/system.c
76 --- tar-1.26.orig//src/system.c 2010-11-05 04:16:25.000000000 -0400
77 +++ tar-1.26/src/system.c 2011-03-12 04:50:18.000000000 -0500
78 @@ -190,7 +190,9 @@
79 const char *shell = getenv ("SHELL");
80 if (! shell)
81 shell = "/bin/sh";
82 - child = xfork ();
83 + child = vfork ();
84 + if (child == (pid_t) -1)
85 + call_arg_fatal ("fork", _("child process"));
86 if (child == 0)
88 priv_set_restore_linkdir ();
89 @@ -319,7 +321,9 @@
90 pid_t child_pid;
92 xpipe (parent_pipe);
93 - child_pid = xfork ();
94 + child_pid = vfork ();
95 + if (child_pid == (pid_t) -1)
96 + call_arg_fatal ("fork", _("child process"));
98 if (child_pid > 0)
100 @@ -372,7 +376,9 @@
101 /* We do need a grandchild tar. */
103 xpipe (child_pipe);
104 - grandchild_pid = xfork ();
105 + grandchild_pid = vfork ();
106 + if (grandchild_pid == (pid_t) -1)
107 + call_arg_fatal ("fork", _("child process"));
109 if (grandchild_pid == 0)
111 @@ -488,7 +494,9 @@
112 pid_t child_pid;
114 xpipe (parent_pipe);
115 - child_pid = xfork ();
116 + child_pid = vfork ();
117 + if (child_pid == (pid_t) -1)
118 + call_arg_fatal ("fork", _("child process"));
120 if (child_pid > 0)
122 @@ -530,7 +538,9 @@
123 /* We do need a grandchild tar. */
125 xpipe (child_pipe);
126 - grandchild_pid = xfork ();
127 + grandchild_pid = vfork ();
128 + if (grandchild_pid == (pid_t) -1)
129 + call_arg_fatal ("fork", _("child process"));
131 if (grandchild_pid == 0)
133 @@ -708,7 +718,9 @@
135 xpipe (p);
136 pipe_handler = signal (SIGPIPE, SIG_IGN);
137 - global_pid = xfork ();
138 + global_pid = vfork ();
139 + if (global_pid == (pid_t) -1)
140 + call_arg_fatal ("fork", _("child process"));
142 if (global_pid != 0)
144 @@ -780,7 +792,9 @@
145 xpipe (p);
146 saved_handler = signal (SIGPIPE, SIG_IGN);
148 - pid = xfork ();
149 + pid = vfork ();
150 + if (pid == (pid_t) -1)
151 + call_arg_fatal ("fork", _("child process"));
153 if (pid != 0)