diff --git a/library/GNUmakefile.68k b/library/GNUmakefile.68k index a6bbbc1..484cafa 100644 --- a/library/GNUmakefile.68k +++ b/library/GNUmakefile.68k @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.68k,v 1.37 2005-03-07 16:56:35 obarthel Exp $ +# $Id: GNUmakefile.68k,v 1.38 2005-03-09 10:48:58 obarthel Exp $ # # :ts=8 # @@ -139,7 +139,6 @@ C_LIB = \ ctype_tolower.o \ ctype_toupper.o \ dirent_closedir.o \ - dirent_data.o \ dirent_opendir.o \ dirent_readdir.o \ dirent_rewinddir.o \ @@ -177,7 +176,6 @@ C_LIB = \ signal_sigsetmask.o \ stat_chmod.o \ stat_convertfileinfo.o \ - stat_data.o \ stat_fchmod.o \ stat_fstat.o \ stat_lstat.o \ @@ -187,7 +185,6 @@ C_LIB = \ stat_umask.o \ stdio_asprintf.o \ stdio_clearerr.o \ - stdio_data.o \ stdio_dropiobreadbuffer.o \ stdio_duplicate_fd.o \ stdio_examine_fh.o \ @@ -444,7 +441,6 @@ C_LIB = \ UNIX_LIB = \ unix.lib_rev.o \ dirent_closedir.o \ - dirent_data.o \ dirent_rewinddir.o \ dirent_opendir.o \ dirent_readdir.o \ @@ -504,7 +500,6 @@ MATH_LIB = \ math_ceil.o \ math_cos.o \ math_cosh.o \ - math_data.o \ math_exp.o \ math_fabs.o \ math_floor.o \ @@ -599,7 +594,6 @@ NET_LIB = \ socket_accept.o \ socket_bind.o \ socket_connect.o \ - socket_data.o \ socket_gethostbyaddr.o \ socket_gethostbyname.o \ socket_gethostid.o \ diff --git a/library/GNUmakefile.os4 b/library/GNUmakefile.os4 index 3b1d599..b302378 100644 --- a/library/GNUmakefile.os4 +++ b/library/GNUmakefile.os4 @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.os4,v 1.36 2005-03-07 11:16:43 obarthel Exp $ +# $Id: GNUmakefile.os4,v 1.37 2005-03-09 10:48:58 obarthel Exp $ # # :ts=8 # @@ -138,7 +138,6 @@ C_LIB = \ ctype_tolower.o \ ctype_toupper.o \ dirent_closedir.o \ - dirent_data.o \ dirent_opendir.o \ dirent_readdir.o \ dirent_rewinddir.o \ @@ -176,7 +175,6 @@ C_LIB = \ signal_sigsetmask.o \ stat_chmod.o \ stat_convertfileinfo.o \ - stat_data.o \ stat_fchmod.o \ stat_fstat.o \ stat_lstat.o \ @@ -186,7 +184,6 @@ C_LIB = \ stat_umask.o \ stdio_asprintf.o \ stdio_clearerr.o \ - stdio_data.o \ stdio_dropiobreadbuffer.o \ stdio_duplicate_fd.o \ stdio_examine_fh.o \ @@ -444,7 +441,6 @@ C_LIB = \ UNIX_LIB = \ unix.lib_rev.o \ dirent_closedir.o \ - dirent_data.o \ dirent_rewinddir.o \ dirent_opendir.o \ dirent_readdir.o \ @@ -505,7 +501,6 @@ MATH_LIB = \ math_ceil.o \ math_cos.o \ math_cosh.o \ - math_data.o \ math_exp.o \ math_fabs.o \ math_floor.o \ @@ -561,7 +556,6 @@ NET_LIB = \ socket_accept.o \ socket_bind.o \ socket_connect.o \ - socket_data.o \ socket_gethostbyaddr.o \ socket_gethostbyname.o \ socket_gethostid.o \ diff --git a/library/changes b/library/changes index d6380ec..a9d9f71 100644 --- a/library/changes +++ b/library/changes @@ -33,6 +33,10 @@ - Moved the CPU/FPU type tests into the respective linker libraries. +- Moved the data declarations out of math_data.c, stat_data.c, + socket_data.c, dirent_data.c and stdio_data.c and into the + code that initializes them. + c.lib 1.189 (5.3.2005) diff --git a/library/dirent_closedir.c b/library/dirent_closedir.c index 4c12cf3..aae8263 100644 --- a/library/dirent_closedir.c +++ b/library/dirent_closedir.c @@ -1,5 +1,5 @@ /* - * $Id: dirent_closedir.c,v 1.7 2005-02-27 21:58:21 obarthel Exp $ + * $Id: dirent_closedir.c,v 1.8 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -47,6 +47,93 @@ /****************************************************************************/ +/* Directories being scanned whose locks need to be freed when shutting down. */ +struct MinList NOCOMMON __directory_list; + +/****************************************************************************/ + +#if defined(__THREAD_SAFE) + +/****************************************************************************/ + +static struct SignalSemaphore * dirent_lock; + +/****************************************************************************/ + +void +__dirent_lock(void) +{ + if(dirent_lock != NULL) + ObtainSemaphore(dirent_lock); +} + +/****************************************************************************/ + +void +__dirent_unlock(void) +{ + if(dirent_lock != NULL) + ReleaseSemaphore(dirent_lock); +} + +/****************************************************************************/ + +#endif /* __THREAD_SAFE */ + +/****************************************************************************/ + +CLIB_CONSTRUCTOR(__dirent_init) +{ + BOOL success = FALSE; + + ENTER(); + + NewList((struct List *)&__directory_list); + + #if defined(__THREAD_SAFE) + { + dirent_lock = __create_semaphore(); + if(dirent_lock == NULL) + goto out; + } + #endif /* __THREAD_SAFE */ + + success = TRUE; + + out: + + RETURN(success); + + if(success) + CONSTRUCTOR_SUCCEED(); + else + CONSTRUCTOR_FAIL(); +} + +/****************************************************************************/ + +CLIB_DESTRUCTOR(__dirent_exit) +{ + ENTER(); + + if(__directory_list.mlh_Head != NULL) + { + while(NOT IsListEmpty((struct List *)&__directory_list)) + closedir((DIR *)__directory_list.mlh_Head); + } + + #if defined(__THREAD_SAFE) + { + __delete_semaphore(dirent_lock); + dirent_lock = NULL; + } + #endif /* __THREAD_SAFE */ + + LEAVE(); +} + +/****************************************************************************/ + int closedir(DIR * directory_pointer) { diff --git a/library/dirent_data.c b/library/dirent_data.c deleted file mode 100644 index 561f832..0000000 --- a/library/dirent_data.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * $Id: dirent_data.c,v 1.8 2005-03-03 14:20:55 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _DIRENT_HEADERS_H -#include "dirent_headers.h" -#endif /* _DIRENT_HEADERS_H */ - -/****************************************************************************/ - -/* Directories being scanned whose locks need to be freed when shutting down. */ -struct MinList NOCOMMON __directory_list; - -/****************************************************************************/ - -#if defined(__THREAD_SAFE) - -/****************************************************************************/ - -static struct SignalSemaphore * dirent_lock; - -/****************************************************************************/ - -void -__dirent_lock(void) -{ - if(dirent_lock != NULL) - ObtainSemaphore(dirent_lock); -} - -/****************************************************************************/ - -void -__dirent_unlock(void) -{ - if(dirent_lock != NULL) - ReleaseSemaphore(dirent_lock); -} - -/****************************************************************************/ - -#endif /* __THREAD_SAFE */ - -/****************************************************************************/ - -CLIB_CONSTRUCTOR(__dirent_init) -{ - BOOL success = FALSE; - - ENTER(); - - NewList((struct List *)&__directory_list); - - #if defined(__THREAD_SAFE) - { - dirent_lock = __create_semaphore(); - if(dirent_lock == NULL) - goto out; - } - #endif /* __THREAD_SAFE */ - - success = TRUE; - - out: - - RETURN(success); - - if(success) - CONSTRUCTOR_SUCCEED(); - else - CONSTRUCTOR_FAIL(); -} - -/****************************************************************************/ - -CLIB_DESTRUCTOR(__dirent_exit) -{ - ENTER(); - - if(__directory_list.mlh_Head != NULL) - { - while(NOT IsListEmpty((struct List *)&__directory_list)) - closedir((DIR *)__directory_list.mlh_Head); - } - - #if defined(__THREAD_SAFE) - { - __delete_semaphore(dirent_lock); - dirent_lock = NULL; - } - #endif /* __THREAD_SAFE */ - - LEAVE(); -} diff --git a/library/math_data.c b/library/math_data.c deleted file mode 100644 index d11c79d..0000000 --- a/library/math_data.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Id: math_data.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MATH_HEADERS_H -#include "math_headers.h" -#endif /* _MATH_HEADERS_H */ - -/****************************************************************************/ - -#if defined(IEEE_FLOATING_POINT_SUPPORT) - -struct Library * MathIeeeSingBasBase; -struct Library * MathIeeeDoubBasBase; -struct Library * MathIeeeDoubTransBase; - -#endif /* IEEE_FLOATING_POINT_SUPPORT */ - -/****************************************************************************/ - -double __huge_val; diff --git a/library/math_init_exit.c b/library/math_init_exit.c index 2a06a2d..91ed5ee 100644 --- a/library/math_init_exit.c +++ b/library/math_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: math_init_exit.c,v 1.9 2005-03-07 16:56:36 obarthel Exp $ + * $Id: math_init_exit.c,v 1.10 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -57,6 +57,20 @@ /****************************************************************************/ +#if defined(IEEE_FLOATING_POINT_SUPPORT) + +struct Library * MathIeeeSingBasBase; +struct Library * MathIeeeDoubBasBase; +struct Library * MathIeeeDoubTransBase; + +#endif /* IEEE_FLOATING_POINT_SUPPORT */ + +/****************************************************************************/ + +double __huge_val; + +/****************************************************************************/ + CLIB_DESTRUCTOR(__math_exit) { ENTER(); diff --git a/library/smakefile b/library/smakefile index cd552e2..d78dea1 100644 --- a/library/smakefile +++ b/library/smakefile @@ -1,5 +1,5 @@ # -# $Id: smakefile,v 1.29 2005-03-07 11:16:43 obarthel Exp $ +# $Id: smakefile,v 1.30 2005-03-09 10:48:59 obarthel Exp $ # # :ts=8 # @@ -149,7 +149,6 @@ DEBUG_OBJ = \ DIRENT_OBJ = \ dirent_closedir.o \ - dirent_data.o \ dirent_opendir.o \ dirent_readdir.o \ dirent_rewinddir.o @@ -186,7 +185,6 @@ MATH_OBJ = \ math_ceil.o \ math_cos.o \ math_cosh.o \ - math_data.o \ math_exp.o \ math_fabs.o \ math_floor.o \ @@ -233,7 +231,6 @@ SOCKET_OBJ = \ socket_accept.o \ socket_bind.o \ socket_connect.o \ - socket_data.o \ socket_gethostbyaddr.o \ socket_gethostbyname.o \ socket_gethostid.o \ @@ -275,7 +272,6 @@ SOCKET_OBJ = \ STAT_OBJ = \ stat_chmod.o \ stat_convertfileinfo.o \ - stat_data.o \ stat_fchmod.o \ stat_fstat.o \ stat_lstat.o \ @@ -287,7 +283,6 @@ STAT_OBJ = \ STDIO_OBJ = \ stdio_asprintf.o \ stdio_clearerr.o \ - stdio_data.o \ stdio_dropiobreadbuffer.o \ stdio_duplicate_fd.o \ stdio_examine_fh.o \ diff --git a/library/socket_data.c b/library/socket_data.c deleted file mode 100644 index 8975e76..0000000 --- a/library/socket_data.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id: socket_data.c,v 1.4 2005-01-02 09:07:08 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#if defined(SOCKET_SUPPORT) - -/****************************************************************************/ - -#ifndef _SOCKET_HEADERS_H -#include "socket_headers.h" -#endif /* _SOCKET_HEADERS_H */ - -/****************************************************************************/ - -struct Library * __SocketBase; - -/****************************************************************************/ - -#if defined(__amigaos4__) -struct SocketIFace *__ISocket; -#endif /* __amigaos4__ */ - -/****************************************************************************/ - -int h_errno; - -/****************************************************************************/ - -#endif /* SOCKET_SUPPORT */ diff --git a/library/socket_init_exit.c b/library/socket_init_exit.c index 0b8d713..49f3ec2 100644 --- a/library/socket_init_exit.c +++ b/library/socket_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: socket_init_exit.c,v 1.13 2005-03-05 17:55:26 obarthel Exp $ + * $Id: socket_init_exit.c,v 1.14 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -78,6 +78,20 @@ struct DaemonMessage /****************************************************************************/ +struct Library * __SocketBase; + +/****************************************************************************/ + +#if defined(__amigaos4__) +struct SocketIFace *__ISocket; +#endif /* __amigaos4__ */ + +/****************************************************************************/ + +int h_errno; + +/****************************************************************************/ + CLIB_DESTRUCTOR(__socket_exit) { ENTER(); diff --git a/library/stat_data.c b/library/stat_data.c deleted file mode 100644 index b726f98..0000000 --- a/library/stat_data.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * $Id: stat_data.c,v 1.2 2005-01-02 09:07:08 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _STAT_HEADERS_H -#include "stat_headers.h" -#endif /* _STAT_HEADERS_H */ - -/****************************************************************************/ - -mode_t __current_umask = S_IWGRP | S_IWOTH; diff --git a/library/stat_umask.c b/library/stat_umask.c index 7c46690..e24160c 100644 --- a/library/stat_umask.c +++ b/library/stat_umask.c @@ -1,5 +1,5 @@ /* - * $Id: stat_umask.c,v 1.3 2005-01-02 09:07:08 obarthel Exp $ + * $Id: stat_umask.c,v 1.4 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -51,6 +51,10 @@ /****************************************************************************/ +mode_t __current_umask = S_IWGRP | S_IWOTH; + +/****************************************************************************/ + mode_t umask(mode_t new_mask) { @@ -66,7 +70,9 @@ umask(mode_t new_mask) result = __getumask(); PROFILE_ON(); - __umask(new_mask & (S_IRWXU | S_IRWXG | S_IRWXO)); + __current_umask = new_mask & (S_IRWXU | S_IRWXG | S_IRWXO); + + __umask(__current_umask); RETURN(result); return(result); diff --git a/library/stdio_data.c b/library/stdio_data.c deleted file mode 100644 index fadd249..0000000 --- a/library/stdio_data.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id: stdio_data.c,v 1.2 2005-01-02 09:07:08 obarthel Exp $ - * - * :ts=4 - * - * Portable ISO 'C' (1994) runtime library for the Amiga computer - * Copyright (c) 2002-2005 by Olaf Barthel - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Neither the name of Olaf Barthel nor the names of contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _STDIO_HEADERS_H -#include "stdio_headers.h" -#endif /* _STDIO_HEADERS_H */ - -/****************************************************************************/ - -/* The file handle table. */ -struct iob ** __iob; -int __num_iob; - -/****************************************************************************/ - -/* The file descriptor table. */ -struct fd ** __fd; -int __num_fd; diff --git a/library/stdio_growfdtable.c b/library/stdio_growfdtable.c index 7801de1..4513cc8 100644 --- a/library/stdio_growfdtable.c +++ b/library/stdio_growfdtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growfdtable.c,v 1.4 2005-03-04 09:07:09 obarthel Exp $ + * $Id: stdio_growfdtable.c,v 1.5 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -43,6 +43,12 @@ /****************************************************************************/ +/* The file descriptor table. */ +struct fd ** __fd; +int __num_fd; + +/****************************************************************************/ + int __grow_fd_table(int max_fd) { diff --git a/library/stdio_growiobtable.c b/library/stdio_growiobtable.c index 40f58d0..8cd7c27 100644 --- a/library/stdio_growiobtable.c +++ b/library/stdio_growiobtable.c @@ -1,5 +1,5 @@ /* - * $Id: stdio_growiobtable.c,v 1.4 2005-03-04 09:07:09 obarthel Exp $ + * $Id: stdio_growiobtable.c,v 1.5 2005-03-09 10:48:59 obarthel Exp $ * * :ts=4 * @@ -43,6 +43,12 @@ /****************************************************************************/ +/* The file handle table. */ +struct iob ** __iob; +int __num_iob; + +/****************************************************************************/ + int __grow_iob_table(int max_iob) {