gioser

sergio/takana

> Una distribución Linux construida con un laboratorio funcional y hermético en el > sótano, y una terminal mutable, clásica y anárquica en el piso de arriba — diseñada > desde el suelo para que una IA programadora entienda, modifique y co…

TOML 1471Shell 173Rust 105Markdown 943545 Definiciones

⎇ f403cf9afbfd7afa22af352b4325458f14a6bfd7 recipes/implicit.patch 550 líneas · 16.2 KB Historia crudo

zsh: el shell de login del usuario, que no tenía receta en ninguna de las cinco colas 38c2874e4 · sergio ·

1https://bugs.gentoo.org/869539
2https://www.zsh.org/mla/workers/2022/msg00964.html
3--- a/configure.ac
4+++ b/configure.ac
5@@ -583,11 +583,11 @@ if test x$zsh_cv_c_have_union_init = xye
6 fi
7 
8 dnl  Checking if compiler correctly cast signed to unsigned.
9 AC_CACHE_CHECK(if signed to unsigned casting is broken,
10 zsh_cv_c_broken_signed_to_unsigned_casting,
11-[AC_RUN_IFELSE([AC_LANG_SOURCE([[main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])])
12+[AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])])
13 AH_TEMPLATE([BROKEN_SIGNED_TO_UNSIGNED_CASTING],
14 [Define to 1 if compiler incorrectly cast signed to unsigned.])
15 if test x$zsh_cv_c_broken_signed_to_unsigned_casting = xyes; then
16   AC_DEFINE(BROKEN_SIGNED_TO_UNSIGNED_CASTING)
17 fi
18@@ -1044,21 +1044,21 @@ if test x$zsh_cv_long_is_64_bit = xyes;
19 else
20   AC_CACHE_CHECK(if off_t is 64 bit, zsh_cv_off_t_is_64_bit,
21   [AC_RUN_IFELSE([AC_LANG_SOURCE([[
22 #include <sys/types.h>
23 
24-main() { return sizeof(off_t) < 8; }
25+int main() { return sizeof(off_t) < 8; }
26 ]])],[zsh_cv_off_t_is_64_bit=yes],[zsh_cv_off_t_is_64_bit=no],[zsh_cv_off_t_is_64_bit=no])])
27   if test x$zsh_cv_off_t_is_64_bit = xyes; then
28     AC_DEFINE(OFF_T_IS_64_BIT)
29   fi
30 
31   AC_CACHE_CHECK(if ino_t is 64 bit, zsh_cv_ino_t_is_64_bit,
32   [AC_RUN_IFELSE([AC_LANG_SOURCE([[
33 #include <sys/types.h>
34 
35-main() { return sizeof(ino_t) < 8; }
36+int main() { return sizeof(ino_t) < 8; }
37 ]])],[zsh_cv_ino_t_is_64_bit=yes],[zsh_cv_ino_t_is_64_bit=no],[zsh_cv_ino_t_is_64_bit=no])])
38   if test x$zsh_cv_ino_t_is_64_bit = xyes; then
39     AC_DEFINE(INO_T_IS_64_BIT)
40   fi
41 
42@@ -1394,22 +1394,22 @@ zsh_cv_func_tgetent_accepts_null,
43 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
44 #include <fcntl.h>
45 #include <stdlib.h>
46 int tgetent(char *, char *);
47 char *tgetstr(char *, char **);
48-main()
49+int main()
50 {
51     char buf[4096];
52     int r1 = tgetent(buf, "vt100");
53     int r2 = tgetent((char*)0,"vt100");
54     if (r1 >= 0 && r1 == r2) {
55         char tbuf[1024], *u;
56         u = tbuf;
57     	tgetstr("cl", &u);
58 	creat("conftest.tgetent", 0640);
59     }
60-    exit((r1 != r2) || r2 == -1);
61+    return((r1 != r2) || r2 == -1);
62 }
63 ]])],[if test -f conftest.tgetent; then
64     zsh_cv_func_tgetent_accepts_null=yes
65   else
66     zsh_cv_func_tgetent_accepts_null=no
67@@ -1422,22 +1422,22 @@ zsh_cv_func_tgetent_zero_success,
68 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
69 #include <fcntl.h>
70 #include <stdlib.h>
71 int tgetent(char *, char*);
72 char *tgetstr(char *, char **);
73-main()
74+int main()
75 {
76     char buf[4096];
77     int r1 = tgetent(buf, "!@#$%^&*");
78     int r2 = tgetent(buf, "vt100");
79     if (r1 < 0 && r2 == 0) {
80         char tbuf[1024], *u;
81         u = tbuf;
82     	tgetstr("cl", &u);
83 	creat("conftest.tgetent0", 0640);
84     }
85-    exit(r1 == r2);
86+    return(r1 == r2);
87 }
88 ]])],[if test -f conftest.tgetent0; then
89     zsh_cv_func_tgetent_zero_success=yes
90   else
91     zsh_cv_func_tgetent_zero_success=no
92@@ -1860,27 +1860,27 @@ zsh_cv_rlim_t_is_longer,
93 #ifdef HAVE_SYS_TIME_H
94 #include <sys/time.h>
95 #endif
96 #include <sys/resource.h>
97 #include <stdlib.h>
98-main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
99+int main(){struct rlimit r;return(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
100 if test x$zsh_cv_rlim_t_is_longer = xyes; then
101   AC_CACHE_CHECK(if rlim_t is a quad,
102   zsh_cv_rlim_t_is_quad_t,
103   [AC_RUN_IFELSE([AC_LANG_SOURCE([[
104 #ifdef HAVE_SYS_TIME_H
105 #include <sys/time.h>
106 #endif
107 #include <stdio.h>
108 #include <sys/resource.h>
109 #include <stdlib.h>
110-main() { 
111+int main() { 
112   struct rlimit r;
113   char buf[20];
114   r.rlim_cur = 0;
115   sprintf(buf, "%qd", r.rlim_cur);
116-  exit(strcmp(buf, "0"));
117+  return(strcmp(buf, "0"));
118 }]])],[zsh_cv_rlim_t_is_quad_t=yes],[zsh_cv_rlim_t_is_quad_t=no],[zsh_cv_rlim_t_is_quad_t=no])])
119   if test x$zsh_cv_rlim_t_is_quad_t = xyes; then
120     AC_DEFINE(RLIM_T_IS_QUAD_T)
121     DEFAULT_RLIM_T=quad_t
122   else
123@@ -1894,11 +1894,11 @@ else
124 #ifdef HAVE_SYS_TIME_H
125 #include <sys/time.h>
126 #endif
127 #include <sys/resource.h>
128 #include <stdlib.h>
129-  main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
130+  int main(){struct rlimit r;r.rlim_cur=-1;return(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
131   if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then
132     AC_DEFINE(RLIM_T_IS_UNSIGNED)
133     DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T"
134   fi
135 fi
136@@ -2175,11 +2175,11 @@ zsh_cv_sys_fifo,
137 #include <fcntl.h>
138 #include <signal.h>
139 #include <unistd.h>
140 #include <stdlib.h>
141 #include <sys/stat.h>
142-main()
143+int main()
144 {
145     char c;
146     int fd;
147     int pid, ret;
148     unlink("/tmp/fifo$$");
149@@ -2189,19 +2189,19 @@ main()
150     if(mknod("/tmp/fifo$$", 0010600, 0) < 0)
151 #endif
152 	exit(1);
153     pid = fork();
154     if(pid < 0)
155-	exit(1);
156+	return(1);
157     if(pid) {
158 	fd = open("/tmp/fifo$$", O_RDONLY);
159-	exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
160+	return(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
161     }
162     fd = open("/tmp/fifo$$", O_WRONLY);
163     ret = (fd < 0 || write(fd, "x", 1) < 1);
164     unlink("/tmp/fifo$$");
165-    exit(ret);
166+    return(ret);
167 }
168 ]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes])
169 ])
170 AH_TEMPLATE([HAVE_FIFOS],
171 [Define to 1 if system has working FIFOs.])
172@@ -2276,24 +2276,24 @@ AC_CACHE_CHECK(if link() works,
173 zsh_cv_sys_link,
174 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
175 #include <unistd.h>
176 #include <fcntl.h>
177 #include <stdlib.h>
178-main()
179+int main()
180 {
181     int ret;
182     char *tmpfile, *newfile;
183     tmpfile="/tmp/zsh.linktest$$";
184     newfile="/tmp/zsh.linktest2$$";
185     unlink(tmpfile);
186     unlink(newfile);
187     if(creat(tmpfile, 0644) < 0)
188-	exit(1);
189+	return(1);
190     ret = link(tmpfile, newfile);
191     unlink(tmpfile);
192     unlink(newfile);
193-    exit(ret<0);
194+    return(ret<0);
195 }
196 ]])],[zsh_cv_sys_link=yes],[zsh_cv_sys_link=no],[zsh_cv_sys_link=yes])])
197 AH_TEMPLATE([HAVE_LINK],
198 [Define to 1 if system has working link().])
199 if test x$zsh_cv_sys_link = xyes; then
200@@ -2309,15 +2309,15 @@ zsh_cv_sys_killesrch,
201 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
202 #include <unistd.h>
203 #include <signal.h>
204 #include <errno.h>
205 #include <stdlib.h>
206-main()
207+int main()
208 {
209     int pid = (getpid() + 10000) & 0xffffff;
210     while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1;
211-    exit(errno!=ESRCH);
212+    return(errno!=ESRCH);
213 }
214 ]])],[zsh_cv_sys_killesrch=yes],[zsh_cv_sys_killesrch=no],[zsh_cv_sys_killesrch=yes])])
215 AH_TEMPLATE([BROKEN_KILL_ESRCH],
216 [Define to 1 if kill(pid, 0) doesn't return ESRCH, ie BeOS R4.51.])
217 if test x$zsh_cv_sys_killesrch = xno; then
218@@ -2339,11 +2339,11 @@ if test x$signals_style = xPOSIX_SIGNALS
219 #include <stdlib.h>
220 int child=0;
221 void handler(sig)
222     int sig;
223 {if(sig==SIGCHLD) child=1;}
224-main() {
225+int main() {
226     struct sigaction act;
227     sigset_t set;
228     int pid, ret;
229     act.sa_handler = &handler;
230     sigfillset(&act.sa_mask);
231@@ -2354,11 +2354,11 @@ main() {
232     pid=fork();
233     if(pid==0) return 0;
234     if(pid>0) {
235     sigemptyset(&set);
236         ret=sigsuspend(&set);
237-        exit(child==0);
238+        return(child==0);
239     }
240 }
241 ]])],[zsh_cv_sys_sigsuspend=yes],[zsh_cv_sys_sigsuspend=no],[zsh_cv_sys_sigsuspend=yes])])
242     if test x$zsh_cv_sys_sigsuspend = xno; then
243       AC_DEFINE(BROKEN_POSIX_SIGSUSPEND)
244@@ -2387,18 +2387,18 @@ case "x$zsh_working_tcsetpgrp" in
245     [AC_RUN_IFELSE([AC_LANG_SOURCE([[
246 #include <sys/types.h>
247 #include <unistd.h>
248 #include <fcntl.h>
249 #include <stdlib.h>
250-main() {
251+int main() {
252     int fd;
253     int ret;
254     fd=open("/dev/tty", O_RDWR);
255     if (fd < 0) exit(2);
256     ret=tcsetpgrp(fd, tcgetpgrp(fd));
257     if (ret < 0) exit(1);
258-    exit(0);
259+    return(0);
260 }
261 ]])],[zsh_cv_sys_tcsetpgrp=yes],[
262 case $? in
263     1) zsh_cv_sys_tcsetpgrp=no;;
264     2) zsh_cv_sys_tcsetpgrp=notty;;
265@@ -2434,19 +2434,19 @@ if test x$ac_cv_func_getpwnam = xyes; th
266 #include <pwd.h>
267 #include <stdio.h>
268 #include <string.h>
269 #include <stdlib.h>
270 #include <unistd.h>
271-main() {
272+int main() {
273     struct passwd *pw1, *pw2;
274     char buf[1024], name[1024];
275     sprintf(buf, "%d:%d", getpid(), rand());
276     pw1=getpwnam(buf);
277     if (pw1) strcpy(name, pw1->pw_name);
278     sprintf(buf, "%d:%d", rand(), getpid());
279     pw2=getpwnam(buf);
280-    exit(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
281+    return(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
282 }
283 ]])],[zsh_cv_sys_getpwnam_faked=no],[zsh_cv_sys_getpwnam_faked=yes],[zsh_cv_sys_getpwnam_faked=no])])
284     if test x$zsh_cv_sys_getpwnam_faked = xyes; then
285       AC_DEFINE(GETPWNAM_FAKED)
286     fi
287@@ -2763,22 +2763,20 @@ elif test "x$dynamic" = xyes; then
288    zsh_cv_sys_elf,
289    [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are produced */
290 #include <fcntl.h>
291 #include <stdlib.h>
292 #include <unistd.h>
293-main(argc, argv)
294-int argc;
295-char *argv[];
296+int main(int argc, char *argv[])
297 {
298 	char b[4];
299 	int i = open(argv[0],O_RDONLY);
300 	if(i == -1) 
301 		exit(1); /* fail */
302 	if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
303-		exit(0); /* succeed (yes, it's ELF) */
304+		return(0); /* succeed (yes, it's ELF) */
305 	else
306-		exit(1); /* fail */
307+		return(1); /* fail */
308 }]])],[zsh_cv_sys_elf=yes],[zsh_cv_sys_elf=no],[zsh_cv_sys_elf=yes])])
309 
310   # We use [0-9]* in case statements, so need to change quoting
311   changequote(, )
312 
313@@ -2908,11 +2908,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
314 EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}"],[zsh_cvs_rdynamic_available=no])
315 LDFLAGS="$old_LDFLAGS")
316   AC_CACHE_CHECK(if your dlsym() needs a leading underscore,
317    zsh_cv_func_dlsym_needs_underscore,
318    [echo failed >conftestval && cat >conftest.c <<EOM
319-fred () { }
320+void fred () { }
321 EOM
322     AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AS_MESSAGE_LOG_FD) &&
323     AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AS_MESSAGE_LOG_FD) &&
324     AC_RUN_IFELSE([AC_LANG_SOURCE([[
325 #include <stdio.h>
326@@ -2943,34 +2941,34 @@ char *zsh_gl_sym_addr ;
327 #define RTLD_LAZY 1
328 #endif
329 
330 extern int fred() ;
331 
332-main()
333+int main()
334 {
335     void * handle ;
336     void * symbol ;
337     FILE *f=fopen("conftestval", "w");
338     if (!f) exit(1);
339     handle = dlopen("./conftest.$DL_EXT", RTLD_LAZY) ;
340     if (handle == NULL) {
341         fprintf (f, "dlopen failed") ;
342-            exit(1);
343+            return(1);
344     }
345     symbol = dlsym(handle, "fred") ;
346     if (symbol == NULL) {
347                 /* try putting a leading underscore */
348         symbol = dlsym(handle, "_fred") ;
349         if (symbol == NULL) {
350             fprintf (f, "dlsym failed") ;
351-                exit(1);
352+                return(1);
353                 }
354         fprintf (f, "yes") ;
355     }
356     else
357         fprintf (f, "no") ;
358-    exit(0);
359+    return(0);
360 }]])],[zsh_cv_func_dlsym_needs_underscore=`cat conftestval`],[zsh_cv_func_dlsym_needs_underscore=failed
361     dynamic=no],[zsh_cv_func_dlsym_needs_underscore=no])])
362   if test "x$zsh_cv_func_dlsym_needs_underscore" = xyes; then
363     AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
364   elif test "x$zsh_cv_func_dlsym_needs_underscore" != xno; then
365--- a/aczsh.m4.old
366+++ b/aczsh.m4
367@@ -42,10 +42,11 @@ AC_DEFUN(zsh_64_BIT_TYPE,
368 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
369 #ifdef HAVE_SYS_TYPES_H
370 #include <sys/types.h>
371 #endif
372 
373+int
374 main()
375 {
376   $1 foo = 0; 
377   int bar = (int) foo;
378   return sizeof($1) != 8;
379@@ -144,33 +145,34 @@ char *zsh_gl_sym_addr ;
380 #endif
381 #ifndef RTLD_GLOBAL
382 #define RTLD_GLOBAL 0
383 #endif
384 
385+int
386 main()
387 {
388     void *handle1, *handle2;
389     void *(*zsh_getaddr1)(), *(*zsh_getaddr2)();
390     void *sym1, *sym2;
391     handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
392-    if(!handle1) exit(1);
393+    if(!handle1) return(1);
394     handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
395-    if(!handle2) exit(1);
396+    if(!handle2) return(1);
397     zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1");
398     zsh_getaddr2 = (void *(*)()) dlsym(handle2, "${us}zsh_getaddr2");
399     sym1 = zsh_getaddr1();
400     sym2 = zsh_getaddr2();
401-    if(!sym1 || !sym2) exit(1);
402-    if(sym1 != sym2) exit(1);
403+    if(!sym1 || !sym2) return(1);
404+    if(sym1 != sym2) return(1);
405     dlclose(handle1);
406     handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
407-    if(!handle1) exit(1);
408+    if(!handle1) return(1);
409     zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1");
410     sym1 = zsh_getaddr1();
411-    if(!sym1) exit(1);
412-    if(sym1 != sym2) exit(1);
413-    exit(0);
414+    if(!sym1) return(1);
415+    if(sym1 != sym2) return(1);
416+    return(0);
417 }
418 ]])],[zsh_cv_shared_$1=yes],
419 [zsh_cv_shared_$1=no],
420 [zsh_cv_shared_$1=no]
421 )
422@@ -226,23 +228,23 @@ char *zsh_gl_sym_addr ;
423 #endif
424 #ifndef RTLD_GLOBAL
425 #define RTLD_GLOBAL 0
426 #endif
427 
428-
429+int
430 main()
431 {
432     void *handle1, *handle2;
433     int (*fred1)(), (*fred2)();
434     handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
435-    if(!handle1) exit(1);
436+    if(!handle1) return(1);
437     handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
438-    if(!handle2) exit(1);
439+    if(!handle2) return(1);
440     fred1 = (int (*)()) dlsym(handle1, "${us}fred");
441     fred2 = (int (*)()) dlsym(handle2, "${us}fred");
442-    if(!fred1 || !fred2) exit(1);
443-    exit((*fred1)() != 42 || (*fred2)() != 69);
444+    if(!fred1 || !fred2) return(1);
445+    return((*fred1)() != 42 || (*fred2)() != 69);
446 }
447 ]])],[zsh_cv_sys_dynamic_clash_ok=yes],
448 [zsh_cv_sys_dynamic_clash_ok=no],
449 [zsh_cv_sys_dynamic_clash_ok=no]
450 )
451@@ -302,21 +304,22 @@ char *zsh_gl_sym_addr ;
452 #endif
453 #ifndef RTLD_GLOBAL
454 #define RTLD_GLOBAL 0
455 #endif
456 
457+int
458 main()
459 {
460     void *handle;
461     int (*barneysym)();
462     handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
463-    if(!handle) exit(1);
464+    if(!handle) return(1);
465     handle = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
466-    if(!handle) exit(1);
467+    if(!handle) return(1);
468     barneysym = (int (*)()) dlsym(handle, "${us}barney");
469-    if(!barneysym) exit(1);
470-    exit((*barneysym)() != 69);
471+    if(!barneysym) return(1);
472+    return((*barneysym)() != 69);
473 }
474 ]])],[zsh_cv_sys_dynamic_rtld_global=yes],
475 [zsh_cv_sys_dynamic_rtld_global=no],
476 [zsh_cv_sys_dynamic_rtld_global=no]
477 )
478@@ -372,19 +375,20 @@ char *zsh_gl_sym_addr ;
479 #endif
480 #ifndef RTLD_GLOBAL
481 #define RTLD_GLOBAL 0
482 #endif
483 
484+int
485 main()
486 {
487     void *handle;
488     int (*barneysym)();
489     handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
490-    if(!handle) exit(1);
491+    if(!handle) return(1);
492     barneysym = (int (*)()) dlsym(handle, "${us}barney");
493-    if(!barneysym) exit(1);
494-    exit((*barneysym)() != 69);
495+    if(!barneysym) return(1);
496+    return((*barneysym)() != 69);
497 }
498 
499 int fred () { return 42; }
500 ]])],[zsh_cv_sys_dynamic_execsyms=yes],
501 [zsh_cv_sys_dynamic_execsyms=no],
502@@ -446,19 +450,20 @@ char *zsh_gl_sym_addr ;
503 #endif
504 #ifndef RTLD_GLOBAL
505 #define RTLD_GLOBAL 0
506 #endif
507 
508+int
509 main()
510 {
511     void *handle;
512     int (*barneysym)();
513     handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
514-    if(!handle) exit(1);
515+    if(!handle) return(1);
516     barneysym = (int (*)()) dlsym(handle, "${us}barney");
517-    if(!barneysym) exit(1);
518-    exit((*barneysym)() != 69);
519+    if(!barneysym) return(1);
520+    return((*barneysym)() != 69);
521 }
522 
523 int fred () { return 42; }
524 ]])],[zsh_cv_sys_dynamic_strip_exe=yes],
525 [zsh_cv_sys_dynamic_strip_exe=no],
526@@ -514,19 +519,20 @@ char *zsh_gl_sym_addr ;
527 #endif
528 #ifndef RTLD_GLOBAL
529 #define RTLD_GLOBAL 0
530 #endif
531 
532+int
533 main()
534 {
535     void *handle;
536     int (*fredsym)();
537     handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL);
538-    if(!handle) exit(1);
539+    if(!handle) return(1);
540     fredsym = (int (*)()) dlsym(handle, "${us}fred");
541-    if(!fredsym) exit(1);
542-    exit((*fredsym)() != 42);
543+    if(!fredsym) return(1);
544+    return((*fredsym)() != 42);
545 }
546 ]])],[zsh_cv_sys_dynamic_strip_lib=yes],
547 [zsh_cv_sys_dynamic_strip_lib=no],
548 [zsh_cv_sys_dynamic_strip_lib=no]
549 )
550