X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fbsd-os.c;h=1b013969f35b1baeb3d11697ff5bd6f97f33f584;hb=fb76e3acd8b8a53cdadaa65bce1d090d99e004a0;hp=6d1679007b29091401a6d9ac0d7cb6958af10c17;hpb=17ae4361ba5f4c1062d510f3951b0cc10e0bcd8e;p=sbcl.git diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index 6d16790..1b01396 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -52,7 +52,8 @@ os_vm_size_t os_vm_page_size; #include #include #include /* For the stat-family wrappers. */ - +#include /* For the opendir()/readdir() wrappers */ +#include /* For the socket() wrapper */ static void netbsd_init(); #endif /* __NetBSD__ */ @@ -327,24 +328,44 @@ The system may fail to start.\n", } } -/* The stat() routines in NetBSD's C library are compatibility - wrappers for some very old version of the stat buffer structure. - Programs must be processed by the C toolchain in order to get an - up-to-date definition of the stat() routine. These wrappers are - used only in sb-posix, as of 2006-10-15. -- RMK */ -int _stat(const char *path, struct stat *sb) { - return (stat(path, sb)); +/* Various routines in NetBSD's C library are compatibility wrappers + for old versions. Programs must be processed by the C toolchain in + order to get up-to-date definitions of such routines. */ +/* The stat-family, opendir, and readdir are used only in sb-posix, as + of 2007-01-16. -- RMK */ +int +_stat(const char *path, struct stat *sb) +{ + return stat(path, sb); } - -int _lstat(const char *path, struct stat *sb) { - return (lstat(path, sb)); +int +_lstat(const char *path, struct stat *sb) +{ + return lstat(path, sb); } - -int _fstat(int fd, struct stat *sb) { - return (fstat(fd, sb)); +int +_fstat(int fd, struct stat *sb) +{ + return fstat(fd, sb); } +DIR * +_opendir(const char *filename) +{ + return opendir(filename); +} +struct dirent * +_readdir(DIR *dirp) +{ + return readdir(dirp); +} +/* Used in sb-bsd-sockets. */ +int +_socket(int domain, int type, int protocol) +{ + return socket(domain, type, protocol); +} #endif /* __NetBSD__ */ #ifdef __FreeBSD__