From 8eb888394a435d6772108603a418b09fcdb6c6b4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 28 Sep 2016 15:00:00 +0200 Subject: Split rtemsbsd/rtems/rtems-program.c This improves garbage collection by the linker. --- rtemsbsd/rtems/rtems-program.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'rtemsbsd/rtems/rtems-program.c') diff --git a/rtemsbsd/rtems/rtems-program.c b/rtemsbsd/rtems/rtems-program.c index 69a8961a..45d5450d 100644 --- a/rtemsbsd/rtems/rtems-program.c +++ b/rtemsbsd/rtems/rtems-program.c @@ -38,7 +38,6 @@ */ #include -#include #include #include @@ -50,7 +49,6 @@ #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 @@ -415,37 +413,6 @@ rtems_bsd_program_open(const char *path, int oflag, ...) return fd; } -int -rtems_bsd_program_socket(int domain, int type, int protocol) -{ - struct rtems_bsd_program_control *prog_ctrl = - rtems_bsd_program_get_control_or_null(); - int fd = -1; - - if (prog_ctrl != NULL) { - struct program_fd_item *item = - malloc(sizeof(*item)); - - if (item != NULL) { - /* FIXME: Why is there an implicit declaration warning? - */ - fd = socket(domain, type, protocol); - - if (fd != -1) { - item->fd = fd; - LIST_INSERT_HEAD(&(prog_ctrl->open_fd), - item, entries); - } else { - free(item); - } - } else { - errno = ENOMEM; - } - } - - return fd; -} - int rtems_bsd_program_close(int fd) { -- cgit v1.2.3