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

« back to all changes in this revision

Viewing changes to lib/getdtablesize.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
1
/* getdtablesize() function for platforms that don't have it.
2
 
   Copyright (C) 2008-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2008-2012 Free Software Foundation, Inc.
3
3
   Written by Bruno Haible <bruno@clisp.org>, 2008.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
24
24
 
25
25
#include <stdio.h>
26
26
 
 
27
#include "msvc-inval.h"
 
28
 
 
29
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 
30
static inline int
 
31
_setmaxstdio_nothrow (int newmax)
 
32
{
 
33
  int result;
 
34
 
 
35
  TRY_MSVC_INVAL
 
36
    {
 
37
      result = _setmaxstdio (newmax);
 
38
    }
 
39
  CATCH_MSVC_INVAL
 
40
    {
 
41
      result = -1;
 
42
    }
 
43
  DONE_MSVC_INVAL;
 
44
 
 
45
  return result;
 
46
}
 
47
# define _setmaxstdio _setmaxstdio_nothrow
 
48
#endif
 
49
 
27
50
/* Cache for the previous getdtablesize () result.  */
28
51
static int dtablesize;
29
52