~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/test-cloexec.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* Test duplicating non-inheritable file descriptors.
4
 
   Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2009-2012 Free Software Foundation, Inc.
5
3
 
6
4
   This program is free software: you can redistribute it and/or modify
7
5
   it under the terms of the GNU General Public License as published by
27
25
#include <unistd.h>
28
26
 
29
27
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
30
 
/* Get declarations of the Win32 API functions.  */
 
28
/* Get declarations of the native Windows API functions.  */
31
29
# define WIN32_LEAN_AND_MEAN
32
30
# include <windows.h>
 
31
/* Get _get_osfhandle.  */
 
32
# include "msvc-nothrow.h"
33
33
#endif
34
34
 
35
35
#include "binary-io.h"
40
40
is_inheritable (int fd)
41
41
{
42
42
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
43
 
  /* On Win32, the initial state of unassigned standard file
 
43
  /* On native Windows, the initial state of unassigned standard file
44
44
     descriptors is that they are open but point to an
45
45
     INVALID_HANDLE_VALUE, and there is no fcntl.  */
46
46
  HANDLE h = (HANDLE) _get_osfhandle (fd);