New macro uc_property_is_valid.
[pspp] / lib / close.c
index b0464c96b2682aaed1b9ad0d0fbd48688ea06f94..0e56dcb27f7b2729d0d2dd7c87444704d2f44a55 100644 (file)
@@ -1,5 +1,5 @@
 /* close replacement.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 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 <unistd.h>
 
+#include "close-hook.h"
 
 /* Override close() to call into other gnulib modules.  */
 
@@ -26,7 +27,11 @@ 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 (retval >= 0)