X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fclose.c;h=afa8f64058cb9dd16f1135bcf06131993c2c221a;hb=74a9f8aecf503bc6a6a1f955cc847a82b31ddbd4;hp=b0464c96b2682aaed1b9ad0d0fbd48688ea06f94;hpb=d638ad2325cc24731a6deda2cb8d530d1c380a3a;p=gnulib.git diff --git a/lib/close.c b/lib/close.c index b0464c96b..afa8f6405 100644 --- a/lib/close.c +++ b/lib/close.c @@ -1,5 +1,5 @@ /* close replacement. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ /* Specification. */ #include +#include "close-hook.h" /* Override close() to call into other gnulib modules. */ @@ -26,9 +27,13 @@ int rpl_close (int fd) #undef close { +#if WINDOWS_SOCKETS + int retval = execute_all_close_hooks (fd); +#else int retval = close (fd); +#endif -#ifdef FCHDIR_REPLACEMENT +#if REPLACE_FCHDIR if (retval >= 0) _gl_unregister_fd (fd); #endif