diff --git a/library/changes b/library/changes index d9daf04..92ca471 100644 --- a/library/changes +++ b/library/changes @@ -28,6 +28,9 @@ c.lib 1.177 (29.9.2004) - Added strtoll() and strtoull(), with further changes to and . +- The socket exit code now calls the common stdio function which + flushes and shuts down all buffered and unbuffered files. + c.lib 1.175 (10.9.2004) diff --git a/library/socket_init_exit.c b/library/socket_init_exit.c index c4deb9c..6c43552 100644 --- a/library/socket_init_exit.c +++ b/library/socket_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: socket_init_exit.c,v 1.3 2004-09-29 14:17:44 obarthel Exp $ + * $Id: socket_init_exit.c,v 1.4 2004-09-29 17:03:57 obarthel Exp $ * * :ts=4 * @@ -111,16 +111,7 @@ CLIB_DESTRUCTOR(__socket_exit) * does not happen, the stdio cleanup function will * crash (with bells on). */ - if(__fd != NULL && __num_fd > 0) - { - int i; - - for(i = 0 ; i < __num_fd ; i++) - { - if(FLAG_IS_SET(__fd[i]->fd_Flags,FDF_IS_SOCKET) && FLAG_IS_SET(__fd[i]->fd_Flags,FDF_IN_USE)) - close(i); - } - } + __close_all_files(); #if defined(__amigaos4__) {