Changeset 1964 for cpio/vendor/current/gnu/close.c
- Timestamp:
- Feb 3, 2017, 2:02:34 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cpio/vendor/current/gnu/close.c ¶
r118 r1964 1 /* -*- buffer-read-only: t -*- vi: set ro: */2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */3 1 /* close replacement. 4 Copyright (C) 2008-201 0Free Software Foundation, Inc.2 Copyright (C) 2008-2015 Free Software Foundation, Inc. 5 3 6 4 This program is free software: you can redistribute it and/or modify … … 22 20 #include <unistd.h> 23 21 24 #include "close-hook.h" 22 #include <errno.h> 23 24 #include "fd-hook.h" 25 #include "msvc-inval.h" 26 27 #undef close 28 29 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER 30 static int 31 close_nothrow (int fd) 32 { 33 int result; 34 35 TRY_MSVC_INVAL 36 { 37 result = close (fd); 38 } 39 CATCH_MSVC_INVAL 40 { 41 result = -1; 42 errno = EBADF; 43 } 44 DONE_MSVC_INVAL; 45 46 return result; 47 } 48 #else 49 # define close_nothrow close 50 #endif 25 51 26 52 /* Override close() to call into other gnulib modules. */ … … 28 54 int 29 55 rpl_close (int fd) 30 #undef close31 56 { 32 57 #if WINDOWS_SOCKETS 33 int retval = execute_all_close_hooks ( fd);58 int retval = execute_all_close_hooks (close_nothrow, fd); 34 59 #else 35 int retval = close (fd);60 int retval = close_nothrow (fd); 36 61 #endif 37 62
Note:
See TracChangeset
for help on using the changeset viewer.