Ignore:
Timestamp:
Feb 3, 2017, 2:02:34 PM (8 years ago)
Author:
Silvan Scherrer
Message:

cpio: update vendor to version 2.12

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! */
    31/* close replacement.
    4    Copyright (C) 2008-2010 Free Software Foundation, Inc.
     2   Copyright (C) 2008-2015 Free Software Foundation, Inc.
    53
    64   This program is free software: you can redistribute it and/or modify
     
    2220#include <unistd.h>
    2321
    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
     30static int
     31close_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
    2551
    2652/* Override close() to call into other gnulib modules.  */
     
    2854int
    2955rpl_close (int fd)
    30 #undef close
    3156{
    3257#if WINDOWS_SOCKETS
    33   int retval = execute_all_close_hooks (fd);
     58  int retval = execute_all_close_hooks (close_nothrow, fd);
    3459#else
    35   int retval = close (fd);
     60  int retval = close_nothrow (fd);
    3661#endif
    3762
Note: See TracChangeset for help on using the changeset viewer.