From fef6dd1deff7a76cad9ae69c5c678e08a7207abb Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Fri, 15 Jul 2016 07:32:56 +0200 Subject: freebsd: Don't use new wrappers for old ports. Some of the commands have been adapted manually. So the wrapper currently don't necessarily work as expected. For example ifconfig calls malloc outside of the program call. --- freebsd/bin/hostname/hostname.c | 9 +++++++++ freebsd/contrib/tcpdump/tcpdump.c | 9 +++++++++ freebsd/lib/libc/gen/err.c | 9 +++++++++ freebsd/sbin/ifconfig/ifclone.c | 9 +++++++++ freebsd/sbin/ifconfig/ifconfig.c | 9 +++++++++ freebsd/sbin/ifconfig/ifgroup.c | 9 +++++++++ freebsd/sbin/ping/ping.c | 9 +++++++++ freebsd/sbin/ping6/ping6.c | 9 +++++++++ freebsd/sbin/route/route.c | 9 +++++++++ freebsd/usr.bin/netstat/if.c | 9 +++++++++ freebsd/usr.bin/netstat/main.c | 9 +++++++++ 11 files changed, 99 insertions(+) diff --git a/freebsd/bin/hostname/hostname.c b/freebsd/bin/hostname/hostname.c index bd22ce8f..8e9fc975 100644 --- a/freebsd/bin/hostname/hostname.c +++ b/freebsd/bin/hostname/hostname.c @@ -44,6 +44,15 @@ static char sccsid[] = "@(#)hostname.c 8.1 (Berkeley) 5/31/93"; #define __need_getopt_newlib #include #include +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #include diff --git a/freebsd/contrib/tcpdump/tcpdump.c b/freebsd/contrib/tcpdump/tcpdump.c index 3591453c..16914512 100644 --- a/freebsd/contrib/tcpdump/tcpdump.c +++ b/freebsd/contrib/tcpdump/tcpdump.c @@ -43,6 +43,15 @@ static const char rcsid[] _U_ = #define __need_getopt_newlib #include #define setpriority(a, b, c) +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #include diff --git a/freebsd/lib/libc/gen/err.c b/freebsd/lib/libc/gen/err.c index 01612411..b83a86ed 100644 --- a/freebsd/lib/libc/gen/err.c +++ b/freebsd/lib/libc/gen/err.c @@ -50,6 +50,15 @@ __FBSDID("$FreeBSD$"); static FILE *err_file; /* file to use for error output */ static void (*err_exit)(int); #else /* __rtems__ */ +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #define err_file stderr #define err_set_file(x) do { } while (0) diff --git a/freebsd/sbin/ifconfig/ifclone.c b/freebsd/sbin/ifconfig/ifclone.c index 04009e39..d5efbd80 100644 --- a/freebsd/sbin/ifconfig/ifclone.c +++ b/freebsd/sbin/ifconfig/ifclone.c @@ -35,6 +35,15 @@ static const char rcsid[] = #endif /* not lint */ #ifdef __rtems__ +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #endif /* __rtems__ */ #include diff --git a/freebsd/sbin/ifconfig/ifconfig.c b/freebsd/sbin/ifconfig/ifconfig.c index 8fc53f6f..48357afe 100644 --- a/freebsd/sbin/ifconfig/ifconfig.c +++ b/freebsd/sbin/ifconfig/ifconfig.c @@ -48,6 +48,15 @@ static const char rcsid[] = #define option getopt_option #include #undef option +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #endif /* __rtems__ */ diff --git a/freebsd/sbin/ifconfig/ifgroup.c b/freebsd/sbin/ifconfig/ifgroup.c index c8dae3b9..0a0bb272 100644 --- a/freebsd/sbin/ifconfig/ifgroup.c +++ b/freebsd/sbin/ifconfig/ifgroup.c @@ -31,6 +31,15 @@ static const char rcsid[] = #endif /* not lint */ #ifdef __rtems__ +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #endif /* __rtems__ */ #include diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c index 7f0a2297..22032131 100644 --- a/freebsd/sbin/ping/ping.c +++ b/freebsd/sbin/ping/ping.c @@ -46,6 +46,15 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #ifdef __rtems__ #define __need_getopt_newlib #include +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #endif /* __rtems__ */ diff --git a/freebsd/sbin/ping6/ping6.c b/freebsd/sbin/ping6/ping6.c index 2067b54b..8457d8d9 100644 --- a/freebsd/sbin/ping6/ping6.c +++ b/freebsd/sbin/ping6/ping6.c @@ -106,6 +106,15 @@ __FBSDID("$FreeBSD$"); #ifdef __rtems__ #define __need_getopt_newlib #include +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include diff --git a/freebsd/sbin/route/route.c b/freebsd/sbin/route/route.c index 05b4f5a3..b10d11f4 100644 --- a/freebsd/sbin/route/route.c +++ b/freebsd/sbin/route/route.c @@ -44,6 +44,15 @@ static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95"; #ifdef __rtems__ #define __need_getopt_newlib #include +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #endif diff --git a/freebsd/usr.bin/netstat/if.c b/freebsd/usr.bin/netstat/if.c index b026cb47..dd18297b 100644 --- a/freebsd/usr.bin/netstat/if.c +++ b/freebsd/usr.bin/netstat/if.c @@ -36,6 +36,15 @@ static char sccsid[] = "@(#)if.c 8.3 (Berkeley) 4/28/95"; #endif #ifdef __rtems__ +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #endif /* __rtems__ */ #include diff --git a/freebsd/usr.bin/netstat/main.c b/freebsd/usr.bin/netstat/main.c index 1caecbe0..8aeef888 100644 --- a/freebsd/usr.bin/netstat/main.c +++ b/freebsd/usr.bin/netstat/main.c @@ -44,6 +44,15 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #ifdef __rtems__ #define __need_getopt_newlib #include +#define RTEMS_BSD_PROGRAM_NO_OPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_SOCKET_WRAP +#define RTEMS_BSD_PROGRAM_NO_CLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_FOPEN_WRAP +#define RTEMS_BSD_PROGRAM_NO_FCLOSE_WRAP +#define RTEMS_BSD_PROGRAM_NO_MALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_CALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_REALLOC_WRAP +#define RTEMS_BSD_PROGRAM_NO_FREE_WRAP #include #include #endif /* __rtems__ */ -- cgit v1.2.3