~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to debug/tst-chk1.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
1
/* Copyright (C) 2004,2005,2006,2007,2008,2011 Free Software Foundation, Inc.
2
2
   This file is part of the GNU C Library.
3
3
   Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
4
4
 
29
29
#include <string.h>
30
30
#include <unistd.h>
31
31
#include <wchar.h>
 
32
#include <sys/select.h>
32
33
#include <sys/socket.h>
33
34
#include <sys/un.h>
34
35
#include <gnu/option-groups.h>
108
109
      FAIL ();                                  \
109
110
    }
110
111
#if __USE_FORTIFY_LEVEL >= 2 && (!defined __cplusplus || defined __va_arg_pack)
111
 
#define CHK_FAIL2_START CHK_FAIL_START
112
 
#define CHK_FAIL2_END CHK_FAIL_END
 
112
# define CHK_FAIL2_START CHK_FAIL_START
 
113
# define CHK_FAIL2_END CHK_FAIL_END
113
114
#else
114
 
#define CHK_FAIL2_START
115
 
#define CHK_FAIL2_END
 
115
# define CHK_FAIL2_START
 
116
# define CHK_FAIL2_END
116
117
#endif
117
118
 
118
119
static int
1455
1456
  CHK_FAIL_END
1456
1457
#endif
1457
1458
 
 
1459
  fd_set s;
 
1460
  FD_ZERO (&s);
 
1461
  FD_SET (FD_SETSIZE - 1, &s);
 
1462
#if __USE_FORTIFY_LEVEL >= 1
 
1463
  CHK_FAIL_START
 
1464
  FD_SET (FD_SETSIZE, &s);
 
1465
  CHK_FAIL_END
 
1466
#endif
 
1467
  FD_CLR (FD_SETSIZE - 1, &s);
 
1468
#if __USE_FORTIFY_LEVEL >= 1
 
1469
  CHK_FAIL_START
 
1470
  FD_CLR (FD_SETSIZE, &s);
 
1471
  CHK_FAIL_END
 
1472
#endif
 
1473
  FD_ISSET (FD_SETSIZE - 1, &s);
 
1474
#if __USE_FORTIFY_LEVEL >= 1
 
1475
  CHK_FAIL_START
 
1476
  FD_ISSET (FD_SETSIZE, &s);
 
1477
  CHK_FAIL_END
 
1478
#endif
 
1479
 
1458
1480
  return ret;
1459
1481
}