mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 15:40:06 +08:00
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.
This commit is contained in:
parent
87d0cda686
commit
fef6dd1def
@ -44,6 +44,15 @@ static char sccsid[] = "@(#)hostname.c 8.1 (Berkeley) 5/31/93";
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#include <rtems/netcmds-config.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#include <rtems/mdns.h>
|
||||
|
@ -43,6 +43,15 @@ static const char rcsid[] _U_ =
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#include <rtems.h>
|
||||
|
@ -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 <machine/rtems-bsd-program.h>
|
||||
#define err_file stderr
|
||||
#define err_set_file(x) do { } while (0)
|
||||
|
@ -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 <machine/rtems-bsd-program.h>
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/queue.h>
|
||||
|
@ -48,6 +48,15 @@ static const char rcsid[] =
|
||||
#define option getopt_option
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#endif /* __rtems__ */
|
||||
|
@ -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 <machine/rtems-bsd-program.h>
|
||||
#endif /* __rtems__ */
|
||||
#include <rtems/bsd/sys/types.h>
|
||||
|
@ -46,6 +46,15 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
|
||||
#ifdef __rtems__
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#endif /* __rtems__ */
|
||||
|
@ -106,6 +106,15 @@ __FBSDID("$FreeBSD$");
|
||||
#ifdef __rtems__
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
|
||||
|
@ -44,6 +44,15 @@ static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
|
||||
#ifdef __rtems__
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#endif
|
||||
|
@ -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 <machine/rtems-bsd-program.h>
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -44,6 +44,15 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94";
|
||||
#ifdef __rtems__
|
||||
#define __need_getopt_newlib
|
||||
#include <getopt.h>
|
||||
#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 <machine/rtems-bsd-program.h>
|
||||
#include <machine/rtems-bsd-commands.h>
|
||||
#endif /* __rtems__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user