ldd.c (76224) | ldd.c (79452) |
---|---|
1/* 2 * Copyright (c) 1993 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#ifndef lint 32static const char rcsid[] = | 1/* 2 * Copyright (c) 1993 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#ifndef lint 32static const char rcsid[] = |
33 "$FreeBSD: head/usr.bin/ldd/ldd.c 76224 2001-05-02 23:56:21Z obrien $"; | 33 "$FreeBSD: head/usr.bin/ldd/ldd.c 79452 2001-07-09 09:24:06Z brian $"; |
34#endif /* not lint */ 35 36#include <sys/wait.h> 37#include <machine/elf.h> 38#include <a.out.h> 39#include <err.h> 40#include <fcntl.h> 41#include <stdio.h> --- 157 unchanged lines hidden (view full) --- 199 rval |= 1; 200 } else if (WIFEXITED(status) && WEXITSTATUS(status)) { 201 fprintf(stderr, "%s: exit status %d\n", 202 *argv, WEXITSTATUS(status)); 203 rval |= 1; 204 } 205 break; 206 case 0: | 34#endif /* not lint */ 35 36#include <sys/wait.h> 37#include <machine/elf.h> 38#include <a.out.h> 39#include <err.h> 40#include <fcntl.h> 41#include <stdio.h> --- 157 unchanged lines hidden (view full) --- 199 rval |= 1; 200 } else if (WIFEXITED(status) && WEXITSTATUS(status)) { 201 fprintf(stderr, "%s: exit status %d\n", 202 *argv, WEXITSTATUS(status)); 203 rval |= 1; 204 } 205 break; 206 case 0: |
207 rval |= execl(*argv, *argv, NULL) != 0; | 207 rval |= execl(*argv, *argv, (char *)NULL) != 0; |
208 warn("%s", *argv); 209 _exit(1); 210 } 211 } 212 213 return rval; 214} | 208 warn("%s", *argv); 209 _exit(1); 210 } 211 } 212 213 return rval; 214} |