Back to index

glibc  2.9
Classes | Defines | Functions | Variables
annexc.c File Reference
#include <ctype.h>
#include <fnmatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>

Go to the source code of this file.

Classes

struct  header

Defines

#define HEADER_MAX   256
#define H(n)
#define Hc(n, s)
#define Hs(n)
#define NUMBER_OF_HEADERS   (sizeof headers / sizeof *headers)

Functions

static char * xstrndup (const char *, size_t)
static const char ** get_null_defines (void)
static int check_header (const struct header *, const char **)
static int xsystem (const char *)
int main (int argc, char *argv[])

Variables

static const char * macrofile
static const char *const aio_syms []
static const char *const aio_maybe []
static const char *const assert_syms []
static const char *const assert_maybe []
static const char *const ctype_syms []
static const char *const ctype_maybe []
static const char *const dirent_syms []
static const char *const dirent_maybe []
static const char *const errno_syms []
static const char *const errno_maybe []
static const char *const fcntl_syms []
static const char *const fcntl_maybe []
static const char *const float_syms []
static const char *const float_maybe []
static const char *const grp_syms []
static const char *const grp_maybe []
static const char *const limits_syms []
static const char *const limits_maybe []
static const char *const locale_syms []
static const char *const locale_maybe []
static const char *const math_syms []
static const char *const math_maybe []
static const char *const mqueue_syms []
static const char *const mqueue_maybe []
static const char *const pthread_syms []
static const char *const pthread_maybe []
static const char *const pwd_syms []
static const char *const pwd_maybe []
static const char *const sched_syms []
static const char *const sched_maybe []
static const char *const semaphore_syms []
static const char *const semaphore_maybe []
static const char *const setjmp_syms []
static const char *const setjmp_maybe []
static const char *const signal_syms []
static const char *const signal_maybe []
static const char *const stdarg_syms []
static const char *const stdarg_maybe []
static const char *const stddef_syms []
static const char *const stddef_maybe []
static const char *const stdio_syms []
static const char *const stdio_maybe []
static const char *const stdlib_syms []
static const char *const stdlib_maybe []
static const char *const string_syms []
static const char *const string_maybe []
static const char *const mman_syms []
static const char *const mman_maybe []
static const char *const stat_syms []
static const char *const stat_maybe []
static const char *const times_syms []
static const char *const times_maybe []
static const char *const types_syms []
static const char *const types_maybe []
static const char *const utsname_syms []
static const char *const utsname_maybe []
static const char *const wait_syms []
static const char *const wait_maybe []
static const char *const termios_syms []
static const char *const termios_maybe []
static const char *const time_syms []
static const char *const time_maybe []
static const char *const unistd_syms []
static const char *const unistd_maybe []
static const char *const utime_syms []
static const char *const utime_maybe []
static struct header headers []
static const char fmt []
static const char testfmt []
const char * CC
const char * INC

Class Documentation

struct header

Definition at line 98 of file hurdmalloc.c.

Class Members
long check
size_t length
size_t magic
const char *const * maybe
const char * name
size_t nmaybe
size_t nsyms
const char * subset
const char *const * syms
union header u

Define Documentation

#define H (   n)
Value:
{ #n ".h", n##_syms, sizeof (n##_syms) / sizeof (n##_syms[0]), \
    n##_maybe, sizeof (n##_maybe) / sizeof (n##_maybe[0]), NULL }
#define Hc (   n,
  s 
)
Value:
{ #n ".h", n##_syms, sizeof (n##_syms) / sizeof (n##_syms[0]), \
    n##_maybe, sizeof (n##_maybe) / sizeof (n##_maybe[0]), s }
#define HEADER_MAX   256

Definition at line 28 of file annexc.c.

#define Hs (   n)
Value:
{ "sys/" #n ".h", n##_syms, sizeof (n##_syms) / sizeof (n##_syms[0]), \
    n##_maybe, sizeof (n##_maybe) / sizeof (n##_maybe[0]), NULL }
#define NUMBER_OF_HEADERS   (sizeof headers / sizeof *headers)

Definition at line 612 of file annexc.c.


Function Documentation

static int check_header ( const struct header header,
const char **  except 
) [static]

Definition at line 795 of file annexc.c.

{
  char line[BUFSIZ], command[sizeof fmt + strlen (header->name)
                          + 2 * strlen (CC)
                          + strlen (INC) + strlen (macrofile)];
  FILE *input;
  int result = 0;
  int found[header->nsyms];
  int i;

  memset (found, '\0', header->nsyms * sizeof (int));

  printf ("=== %s ===\n", header->name);
  sprintf (command, fmt, header->name, CC, INC, CC, macrofile);

  /* First see whether this subset is supported at all.  */
  if (header->subset != NULL)
    {
      sprintf (line, testfmt, header->subset, header->subset, CC, INC, CC,
              macrofile);
      if (xsystem (line))
       {
         printf ("!! not available\n");
         return 0;
       }
    }

  if (xsystem (command))
    {
      puts ("system() returned nonzero");
      result = 1;
    }
  input = fopen (macrofile, "r");

  if (input == NULL)
    {
      printf ("Could not read %s: ", macrofile);
      perror (NULL);
      return 1;
    }

  while (fgets (line, sizeof line, input) != NULL)
    {
      const char **ignore;
      if (strlen (line) < 9 || line[7] != ' ')
       { /* "#define A" */
         printf ("Malformed input, expected '#define MACRO'\ngot '%s'\n",
                line);
         result = 1;
         continue;
       }

      /* Find next char after the macro identifier; this can be either
        a space or an open parenthesis.  */
      line[8 + strcspn (&line[8], " (")] = '\0';

      /* Now check whether it's one of the required macros.  */
      for (i = 0; i < header->nsyms; ++i)
       if (!strcmp (&line[8], header->syms[i]))
         break;
      if (i < header->nsyms)
       {
         found[i] = 1;
         continue;
       }

      /* Symbols starting with "_" are ok.  */
      if (line[8] == '_')
       continue;

      /* Maybe one of the symbols which are always defined.  */
      for (ignore = except; *ignore != NULL; ++ignore)
       if (! strcmp (&line[8], *ignore))
         break;
      if (*ignore != NULL)
       continue;

      /* Otherwise the symbol better should match one of the following.  */
      for (i = 0; i < header->nmaybe; ++i)
       if (fnmatch (header->maybe[i], &line[8], 0) == 0)
         break;
      if (i < header->nmaybe)
       continue;

      printf ("*  invalid macro `%s'\n", &line[8]);
      result |= 1;
    }
  fclose (input);
  remove (macrofile);

  for (i = 0; i < header->nsyms; ++i)
    if (found[i] == 0)
      printf ("** macro `%s' not defined\n", header->syms[i]);

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static const char ** get_null_defines ( void  ) [static]

Definition at line 707 of file annexc.c.

{
  char line[BUFSIZ], *command;
  char **result = NULL;
  size_t result_len = 0;
  size_t result_max = 0;
  FILE *input;
  int first = 1;

  macrofile = tmpnam (NULL);

  command = malloc (sizeof fmt + sizeof "/dev/null" + 2 * strlen (CC)
                  + strlen (INC) + strlen (macrofile));

  if (command == NULL)
    {
      puts ("No more memory.");
      exit (1);
    }

  sprintf (command, fmt, "/dev/null", CC, INC, CC, macrofile);

  if (xsystem (command))
    {
      puts ("system() returned nonzero");
      return NULL;
    }
  free (command);
  input = fopen (macrofile, "r");

  if (input == NULL)
    {
      printf ("Could not read %s: ", macrofile);
      perror (NULL);
      return NULL;
    }

  while (fgets (line, sizeof line, input) != NULL)
    {
      char *start;
      if (strlen (line) < 9 || line[7] != ' ')
       { /* "#define A" */
         printf ("Malformed input, expected '#define MACRO'\ngot '%s'\n",
                line);
         continue;
       }
      if (line[8] == '_')
       /* It's a safe identifier.  */
       continue;
      if (result_len == result_max)
       {
         result_max += 10;
         result = realloc (result, result_max * sizeof (char **));
         if (result == NULL)
           {
             puts ("No more memory.");
             exit (1);
           }
       }
      start = &line[8];
      result[result_len++] = xstrndup (start, strcspn (start, " ("));

      if (first)
       {
         fputs ("The following identifiers will be ignored since the compiler defines them\nby default:\n", stdout);
         first = 0;
       }
      puts (result[result_len - 1]);
    }
  if (result_len == result_max)
    {
      result_max += 1;
      result = realloc (result, result_max * sizeof (char **));
      if (result == NULL)
       {
         puts ("No more memory.");
         exit (1);
       }
    }
  result[result_len] = NULL;
  fclose (input);
  remove (macrofile);

  return (const char **) result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 638 of file annexc.c.

{
  int h;
  int result = 0;
  const char **ignore_list;

  CC = argc > 1 ? argv[1] : "gcc";
  INC = argc > 2 ? argv[2] : "";

  if (system (NULL) == 0)
    {
      puts ("Sorry, no command processor.");
      return EXIT_FAILURE;
    }

  /* First get list of symbols which are defined by the compiler.  */
  ignore_list = get_null_defines ();

  fputs ("Tested files:\n", stdout);

  for (h = 0; h < NUMBER_OF_HEADERS; ++h)
    result |= check_header (&headers[h], ignore_list);

  /* The test suite should return errors but for now this is not
     practical.  Give a warning and ask the user to correct the bugs.  */
  return result;
}

Here is the call graph for this function:

static char * xstrndup ( const char *  s,
size_t  n 
) [static]

Definition at line 668 of file annexc.c.

{
  size_t len = n;
  char *new = malloc (len + 1);

  if (new == NULL)
    return NULL;

  new[len] = '\0';
  return memcpy (new, s, len);
}

Here is the caller graph for this function:

int xsystem ( const char *  cmd) [static]

Definition at line 683 of file annexc.c.

{
  int status;

  status = system (cmd);
  if (status != -1)
    {
      if (WIFSIGNALED (status))
       {
         if (WTERMSIG (status) == SIGINT || WTERMSIG (status) == SIGQUIT)
           raise (WTERMSIG (status));
       }
      else if (WIFEXITED (status))
       {
         if (WEXITSTATUS (status) == SIGINT + 128
             || WEXITSTATUS (status) == SIGQUIT + 128)
           raise (WEXITSTATUS (status) - 128);
       }
    }
  return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char* const aio_maybe[] [static]
Initial value:
{
  "aio_cancel", "aio_error", "aio_fsync", "aio_read", "aio_return",
  "aio_suspend", "aio_write", "lio_listio",
  
  "creat", "fcntl", "open", "SEEK_CUR", "SEEK_END", "SEEK_SET", "S_IRGRP",
  "S_IROTH", "S_IRUSR", "S_IRWXG", "S_IRWXO", "S_IRWXU", "S_ISBLK",
  "S_ISCHR", "S_ISDIR", "S_ISFIFO", "S_ISGID", "S_ISREG", "S_ISUID",
  "S_IWGRP", "S_IWOTH", "S_IWUSR", "S_IXGRP", "S_IXOTH", "S_IXUSR",
  
  "kill", "raise", "sigaction", "sigaddset", "sigdelset", "sigemptyset",
  "sigfillset", "sigismember", "signal", "sigpending", "sigprocmask",
  "sigqueue", "sigsuspend", "sigtimedwait", "sigwait", "sigwaitinfo"
}

Definition at line 52 of file annexc.c.

const char* const aio_syms[] [static]
Initial value:
{
  "AIO_ALLDONE", "AIO_CANCELED", "AIO_NOTCANCELED", "LIO_NOP", "LIO_NOWAIT",
  "LIO_READ", "LIO_WAIT", "LIO_WRITE",
  
  "FD_CLOEXEC", "F_DUPFD", "F_GETFD", "F_GETFL", "F_GETLK", "F_RDLCK",
  "F_SETFD", "F_SETFL", "F_SETLK", "F_SETLKW", "F_UNLCK", "F_WRLCK",
  "O_ACCMODE", "O_APPEND", "O_CREAT", "O_DSYNC", "O_EXCL", "O_NOCTTY",
  "O_NONBLOCK", "O_RDONLY", "O_RDWR", "O_RSYNC", "O_SYNC", "O_TRUNC",
  "O_WRONLY",
  
  "SA_NOCLDSTOP", "SA_SIGINFO", "SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD",
  "SIGCONT", "SIGEV_NONE", "SIGEV_SIGNAL", "SIGEV_SIGNAL", "SIGEV_THREAD",
  "SIGFPE", "SIGHUP", "SIGILL", "SIGINT", "SIGKILL", "SIGPIPE", "SIGQUIT",
  "SIGRTMAX", "SIGRTMIN", "SIGSEGV", "SIGSTOP", "SIGTERM", "SIGTSTP",
  "SIGTTIN", "SIGTTOU", "SIGUSR1", "SIGUSR2", "SIG_BLOCK", "SIG_DFL",
  "SIG_ERR", "SIG_IGN", "SIG_SETMASK", "SIG_UNBLOCK", "SI_ASYNCIO",
  "SI_MESGQ", "SI_QUEUE", "SI_TIMER", "SI_USER"
}

Definition at line 33 of file annexc.c.

const char* const assert_maybe[] [static]
Initial value:
{
}

Definition at line 72 of file annexc.c.

const char* const assert_syms[] [static]
Initial value:
{
  "assert"
}

Definition at line 68 of file annexc.c.

const char* CC

Definition at line 628 of file annexc.c.

const char* const ctype_maybe[] [static]
Initial value:
{
  "isalnum", "isalpha", "iscntrl", "isdigit", "isgraph", "islower",
  "isprint", "ispunct", "isspace", "isupper", "isxdigit", "tolower",
  "toupper"
}

Definition at line 80 of file annexc.c.

const char* const ctype_syms[] [static]
Initial value:
{
}

Definition at line 77 of file annexc.c.

const char* const dirent_maybe[] [static]
Initial value:
{
  "closedir", "opendir", "readdir", "readdir_r", "rewinddir"
}

Definition at line 91 of file annexc.c.

const char* const dirent_syms[] [static]
Initial value:
{
}

Definition at line 88 of file annexc.c.

const char* const errno_maybe[] [static]
Initial value:
{
  "errno", "E*"
}

Definition at line 107 of file annexc.c.

const char* const errno_syms[] [static]
Initial value:
{
  "E2BIG", "EACCES", "EAGAIN", "EBADF", "EBADMSG", "EBUSY", "ECANCELED",
  "ECHILD", "EDEADLK", "EDOM", "EEXIST", "EFAULT", "EFBIG", "EINPROGRESS",
  "EINTR", "EINVAL", "EIO", "EISDIR", "EMFILE", "EMLINK", "EMSGSIZE",
  "ENAMETOOLONG", "ENFILE", "ENODEV", "ENOENT", "ENOEXEC", "ENOLCK",
  "ENOMEM", "ENOSPC", "ENOSYS", "ENOTDIR", "ENOTEMPTY", "ENOTSUP",
  "ENOTTY", "ENXIO", "EPERM", "EPIPE", "ERANGE", "EROFS", "ESPIPE",
  "ESRCH", "ETIMEDOUT", "EXDEV"
}

Definition at line 97 of file annexc.c.

const char* const fcntl_maybe[] [static]
Initial value:
{
  "creat", "fcntl", "open", "SEEK_CUR", "SEEK_END", "SEEK_SET", "S_IRGRP",
  "S_IROTH", "S_IRUSR", "S_IRWXG", "S_IRWXO", "S_IRWXU", "S_ISBLK",
  "S_ISCHR", "S_ISDIR", "S_ISFIFO", "S_ISGID", "S_ISREG", "S_ISUID",
  "S_IWGRP", "S_IWOTH", "S_IWUSR", "S_IXGRP", "S_IXOTH", "S_IXUSR"
}

Definition at line 121 of file annexc.c.

const char* const fcntl_syms[] [static]
Initial value:
{
  "FD_CLOEXEC", "F_DUPFD", "F_GETFD", "F_GETFL", "F_GETLK", "F_RDLCK",
  "F_SETFD", "F_SETFL", "F_SETLK", "F_SETLKW", "F_UNLCK", "F_WRLCK",
  "O_ACCMODE", "O_APPEND", "O_CREAT", "O_DSYNC", "O_EXCL", "O_NOCTTY",
  "O_NONBLOCK", "O_RDONLY", "O_RDWR", "O_RSYNC", "O_SYNC", "O_TRUNC",
  "O_WRONLY"
}

Definition at line 113 of file annexc.c.

const char* const float_maybe[] [static]
Initial value:
{
}

Definition at line 139 of file annexc.c.

const char* const float_syms[] [static]
Initial value:
{
  "DBL_DIG", "DBL_EPSILON", "DBL_MANT_DIG", "DBL_MAX", "DBL_MAX_10_EXP",
  "DBL_MAX_EXP", "DBL_MIN", "DBL_MIN_10_EXP", "DBL_MIN_EXP", "FLT_DIG",
  "FLT_EPSILON", "FLT_MANT_DIG", "FLT_MAX", "FLT_MAX_10_EXP", "FLT_MAX_EXP",
  "FLT_MIN", "FLT_MIN_10_EXP", "FLT_MIN_EXP", "FLT_RADIX", "FLT_ROUNDS",
  "LDBL_DIG", "LDBL_EPSILON", "LDBL_MANT_DIG", "LDBL_MAX", "LDBL_MAX_10_EXP",
  "LDBL_MAX_EXP", "LDBL_MIN", "LDBL_MIN_10_EXP", "LDBL_MIN_EXP"
}

Definition at line 130 of file annexc.c.

const char fmt[] [static]
Initial value:
"\
echo \"#include <%s>\" |\
%s -E -dM -D_POSIX_SOURCE %s \
-isystem `%s --print-prog-name=include` - > %s"

Definition at line 616 of file annexc.c.

const char* const grp_maybe[] [static]
Initial value:
{
  "getgrgid", "getgrgid_r", "getgrnam", "getgrnam_r"
}

Definition at line 147 of file annexc.c.

const char* const grp_syms[] [static]
Initial value:
{
}

Definition at line 144 of file annexc.c.

struct header headers[] [static]
const char* INC

Definition at line 630 of file annexc.c.

const char* const limits_maybe[] [static]
Initial value:
{
  "AIO_LISTIO_MAX", "AIO_MAX", "ARG_MAX", "CHILD_MAX", "DELAYTIMER_MAX",
  "LINK_MAX", "LOGIN_NAME_MAX", "LONG_MAX", "LONG_MIN", "MAX_CANON",
  "MAX_INPUT", "MQ_OPEN_MAX", "MQ_PRIO_MAX", "NAME_MAX", "OPEN_MAX",
  "PATH_MAX", "PIPE_BUF", "RTSIG_MAX", "PTHREAD_DESTRUCTOR_ITERATIONS",
  "PTHREAD_KEYS_MAX", "PTHREAD_STACK_MIN", "PTHREAD_THREADS_MAX"
}

Definition at line 171 of file annexc.c.

const char* const limits_syms[] [static]
Initial value:
{
  "_POSIX_AIO_LISTIO_MAX", "_POSIX_AIO_MAX", "_POSIX_ARG_MAX",
  "_POSIX_CHILD_MAX", "_POSIX_CLOCKRES_MAX", "_POSIX_DELAYTIMER_MAX",
  "_POSIX_LINK_MAX", "_POSIX_LOGIN_NAME_MAX", "_POSIX_MAX_CANON",
  "_POSIX_MAX_INPUT", "_POSIX_MQ_OPEN_MAX", "_POSIX_MQ_PRIO_MAX",
  "_POSIX_NAME_MAX", "_POSIX_NGROUPS_MAX", "_POSIX_OPEN_MAX",
  "_POSIX_PATH_MAX", "_POSIX_PIPE_BUF", "_POSIX_RTSIG_MAX",
  "_POSIX_SEM_NSEMS_MAX", "_POSIX_SEM_VALUE_MAX", "_POSIX_SIGQUEUE_MAX",
  "_POSIX_SSIZE_MAX", "_POSIX_STREAM_MAX",
  "_POSIX_THREAD_DESTRUCTOR_ITERATIONS", "_POSIX_THREAD_KEYS_MAX",
  "_POSIX_THREAD_THREADS_MAX", "_POSIX_TIMER_MAX", "_POSIX_TTY_NAME_MAX",
  "_POSIX_TZNAME_MAX", "_POSIX_THREAD_DESTRUCTOR_ITERATIONS",
  "CHAR_BIT", "CHAR_MAX", "CHAR_MIN", "INT_MAX", "INT_MIN", "LONG_MAX",
  "LONG_MIN", "MB_LEN_MAX", "NGROUPS_MAX", "PAGESIZE", "SCHAR_MAX",
  "SCHAR_MIN", "SHRT_MAX", "SHRT_MIN", "UCHAR_MAX", "UINT_MAX",
  "ULONG_MAX", "USHRT_MAX"
}

Definition at line 153 of file annexc.c.

const char* const locale_maybe[] [static]
Initial value:
{
  "LC_*", "localeconv", "setlocale"
}

Definition at line 186 of file annexc.c.

const char* const locale_syms[] [static]
Initial value:
{
  "LC_ALL", "LC_COLLATE", "LC_CTYPE", "LC_MONETARY", "LC_NUMERIC",
  "LC_TIME", "NULL"
}

Definition at line 181 of file annexc.c.

const char* macrofile [static]

Definition at line 30 of file annexc.c.

const char* const math_maybe[] [static]
Initial value:
{
  "acos", "asin", "atan2", "atan", "ceil", "cos", "cosh", "exp",
  "fabs", "floor", "fmod", "frexp", "ldexp", "log10", "log", "modf",
  "pow", "sin", "sinh", "sqrt", "tan", "tanh",
  "acosf", "asinf", "atan2f", "atanf", "ceilf", "cosf", "coshf", "expf",
  "fabsf", "floorf", "fmodf", "frexpf", "ldexpf", "log10f", "logf", "modff",
  "powf", "sinf", "sinhf", "sqrtf", "tanf", "tanhf",
  "acosl", "asinl", "atan2l", "atanl", "ceill", "cosl", "coshl", "expl",
  "fabsl", "floorl", "fmodl", "frexpl", "ldexpl", "log10l", "logl", "modfl",
  "powl", "sinl", "sinhl", "sqrtl", "tanl", "tanhl"
}

Definition at line 196 of file annexc.c.

const char* const math_syms[] [static]
Initial value:
{
  "HUGE_VAL"
}

Definition at line 192 of file annexc.c.

const char* const mman_maybe[] [static]
Initial value:
{
  "mlock", "mlockall", "mmap", "mprotect", "msync", "munlock", "munlockall",
  "munmap", "shm_open", "shm_unlock"
}

Definition at line 409 of file annexc.c.

const char* const mman_syms[] [static]
Initial value:
{
  "MAP_FAILED", "MAP_FIXED", "MAP_PRIVATE", "MAP_SHARED", "MCL_CURRENT",
  "MCL_FUTURE", "MS_ASYNC", "MS_INVALIDATE", "MS_SYNC", "PROT_EXEC",
  "PROT_NONE", "PROT_READ", "PROT_WRITE"
}

Definition at line 403 of file annexc.c.

const char* const mqueue_maybe[] [static]
Initial value:
{
  "mq_close", "mq_getattr", "mq_notify", "mq_open", "mq_receive",
  "mq_send", "mq_setattr", "mq_unlink"
}

Definition at line 213 of file annexc.c.

const char* const mqueue_syms[] [static]
Initial value:
{
}

Definition at line 210 of file annexc.c.

const char* const pthread_maybe[] [static]

Definition at line 235 of file annexc.c.

const char* const pthread_syms[] [static]
Initial value:
{
  "PTHREAD_CANCELED", "PTHREAD_CANCEL_ASYNCHRONOUS",
  "PTHREAD_CANCEL_DEFERRED", "PTHREAD_CANCEL_DISABLE", "PTHREAD_CANCEL_ENABLE",
  "PTHREAD_COND_INITIALIZER", "PTHREAD_CREATE_DETACHED",
  "PTHREAD_CREATE_JOINABLE", "PTHREAD_EXPLICIT_SCHED",
  "PTHREAD_INHERIT_SCHED", "PTHREAD_MUTEX_INITIALIZER",
  "PTHREAD_ONCE_INIT", "PTHREAD_PRIO_INHERIT", "PTHREAD_PRIO_NONE",
  "PTHREAD_PRIO_PROTECT", "PTHREAD_PROCESS_PRIVATE",
  "PTHREAD_PROCESS_SHARED", "PTHREAD_SCOPE_PROCESS", "PTHREAD_SCOPE_SYSTEM",
  
  "SCHED_FIFO", "SCHED_OTHER", "SCHED_RR",
  
  "CLK_TCK", "CLOCKS_PER_SEC", "CLOCK_REALTIME", "NULL", "TIMER_ABSTIME"
}

Definition at line 220 of file annexc.c.

const char* const pwd_maybe[] [static]
Initial value:
{
  "getpwnam", "getpwnam_r", "getpwuid", "getpwuid_r"
}

Definition at line 277 of file annexc.c.

const char* const pwd_syms[] [static]
Initial value:
{
}

Definition at line 274 of file annexc.c.

const char* const sched_maybe[] [static]
Initial value:
{
  "sched_get_priority_max", "sched_get_priority_min",
  "sched_get_rr_interval", "sched_getparam", "sched_getscheduler",
  "sched_setparam", "sched_setscheduler", "sched_yield",
  
  "CLK_TCK", "CLOCKS_PER_SEC", "CLOCK_REALTIME", "NULL", "TIMER_ABSTIME"
  "asctime", "asctime_r", "clock", "clock_getres", "clock_gettime",
  "clock_settime", "ctime", "ctime_r", "difftime", "gmtime", "gmtime_r",
  "localtime", "localtime_r", "mktime", "nanosleep", "strftime", "time",
  "timer_create", "timer_delete", "timer_getoverrun", "timer_gettime",
  "timer_settime", "tzset"
}

Definition at line 287 of file annexc.c.

const char* const sched_syms[] [static]
Initial value:
{
  "SCHED_FIFO", "SCHED_OTHER", "SCHED_RR",
}

Definition at line 283 of file annexc.c.

const char* const semaphore_maybe[] [static]
Initial value:
{
  "sem_close", "sem_destroy", "sem_getvalue", "sem_init", "sem_open",
  "sen_post", "sem_trywait", "sem_unlink", "sem_wait"
}

Definition at line 305 of file annexc.c.

const char* const semaphore_syms[] [static]
Initial value:
{
}

Definition at line 302 of file annexc.c.

const char* const setjmp_maybe[] [static]
Initial value:
{
  "longjmp", "setjmp", "siglongjmp", "sigsetjmp"
}

Definition at line 315 of file annexc.c.

const char* const setjmp_syms[] [static]
Initial value:
{
}

Definition at line 312 of file annexc.c.

const char* const signal_maybe[] [static]
Initial value:
{
  "kill", "raise", "sigaction", "sigaddset", "sigdelset", "sigemptyset",
  "sigfillset", "sigismember", "signal", "sigpending", "sigprocmask",
  "sigqueue", "sigsuspend", "sigtimedwait", "sigwait", "sigwaitinfo"
}

Definition at line 331 of file annexc.c.

const char* const signal_syms[] [static]
Initial value:
{
  "SA_NOCLDSTOP", "SA_SIGINFO", "SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD",
  "SIGCONT", "SIGEV_NONE", "SIGEV_SIGNAL", "SIGEV_THREAD",
  "SIGFPE", "SIGHUP", "SIGILL", "SIGINT", "SIGKILL", "SIGPIPE", "SIGQUIT",
  "SIGRTMAX", "SIGRTMIN", "SIGSEGV", "SIGSTOP", "SIGTERM", "SIGTSTP",
  "SIGTTIN", "SIGTTOU", "SIGUSR1", "SIGUSR2", "SIG_BLOCK", "SIG_DFL",
  "SIG_ERR", "SIG_IGN", "SIG_SETMASK", "SIG_UNBLOCK", "SI_ASYNCIO",
  "SI_MESGQ", "SI_QUEUE", "SI_TIMER", "SI_USER"
}

Definition at line 321 of file annexc.c.

const char* const stat_maybe[] [static]
Initial value:
{
  "chmod", "fchmod", "fstat", "mkdir", "mkfifo", "stat", "umask"
}

Definition at line 423 of file annexc.c.

const char* const stat_syms[] [static]
Initial value:
{
  "S_IRGRP", "S_IROTH", "S_IRUSR", "S_IRWXG", "S_IRWXO", "S_IRWXU",
  "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO", "S_ISGID", "S_ISREG",
  "S_ISUID", "S_IWGRP", "S_IWOTH", "S_IWUSR", "S_IXGRP", "S_IXOTH",
  "S_IXUSR", "S_TYPEISMQ", "S_TYPEISSEM", "S_TYPEISSHM"
}

Definition at line 416 of file annexc.c.

const char* const stdarg_maybe[] [static]
Initial value:
{
  "va_list"
}

Definition at line 343 of file annexc.c.

const char* const stdarg_syms[] [static]
Initial value:
{
  "va_arg", "va_end", "va_start"
}

Definition at line 339 of file annexc.c.

const char* const stddef_maybe[] [static]
Initial value:
{
}

Definition at line 353 of file annexc.c.

const char* const stddef_syms[] [static]
Initial value:
{
  "NULL", "offsetof"
}

Definition at line 349 of file annexc.c.

const char* const stdio_maybe[] [static]
Initial value:
{
  "clearerr", "fclose", "fdopen", "feof", "ferror", "fflush", "fgetc",
  "fgetpos", "fgets", "fileno", "flockfile", "fopen", "fprintf", "fputc",
  "fputs", "fread", "freopen", "fscanf", "fseek", "fsetpos", "ftell",
  "ftrylockfile", "funlockfile", "fwrite", "getc", "getchar",
  "getchar_unlocked", "getc_unlocked", "gets", "perror", "printf", "putc",
  "putchar", "putchar_unlocked", "putc_unlocked", "puts", "remove", "rename",
  "rewind", "scanf", "setbuf", "setvbuf", "sprintf", "sscanf", "tmpfile",
  "tmpnam", "ungetc", "vfprintf", "vprintf", "vsprintf"
}

Definition at line 364 of file annexc.c.

const char* const stdio_syms[] [static]
Initial value:
{
  "BUFSIZ", "EOF", "FILENAME_MAX", "FOPEN_MAX", "L_ctermid", "L_cuserid",
  "L_tmpnam", "NULL", "SEEK_CUR", "SEEK_END", "SEEK_SET", "STREAM_MAX",
  "TMP_MAX", "stderr", "stdin", "stdout", "_IOFBF", "_IOLBF", "_IONBF"
}

Definition at line 358 of file annexc.c.

const char* const stdlib_maybe[] [static]
Initial value:
{
  "abort", "abs", "atexit", "atof", "atoi", "atol", "bsearch", "calloc",
  "div", "exit", "free", "getenv", "labs", "ldiv", "malloc", "mblen",
  "mbstowcs", "mbtowc", "qsort", "rand", "rand_r", "realloc", "srand",
  "strtod", "strtol", "strtoul", "system", "wcstombs", "wctomb"
}

Definition at line 381 of file annexc.c.

const char* const stdlib_syms[] [static]
Initial value:
{
  "EXIT_FAILURE", "EXIT_SUCCESS", "MB_CUR_MAX", "NULL", "RAND_MAX"
}

Definition at line 377 of file annexc.c.

const char* const string_maybe[] [static]
Initial value:
{
  "memchr", "memcmp", "memcpy", "memmove", "memset", "strcat", "strchr",
  "strcmp", "strcoll", "strcpy", "strcspn", "strerror", "strlen",
  "strncat", "strncmp", "strncpy", "strpbrk", "strrchr", "strspn",
  "strstr", "strtok", "strtok_r", "strxfrm"
}

Definition at line 394 of file annexc.c.

const char* const string_syms[] [static]
Initial value:
{
  "NULL"
}

Definition at line 390 of file annexc.c.

const char* const termios_maybe[] [static]
Initial value:
{
  "cfgetispeed", "cfgetospeed", "cfsetispeed", "cfsetospeed", "tcdrain",
  "tcflow", "tcflush", "tcgetattr", "tcsendbrk", "tcsetattr"
}

Definition at line 478 of file annexc.c.

const char* const termios_syms[] [static]
Initial value:
{
  "B0", "B110", "B1200", "B134", "B150", "B1800", "B19200", "B200", "B2400",
  "B300", "B38400", "B4800", "B50", "B600", "B75", "B9600", "BRKINT", "CLOCAL",
  "CREAD", "CS5", "CS6", "CS7", "CS8", "CSIZE", "CSTOPN", "ECHO", "ECHOE",
  "ECHOK", "ECHONL", "HUPCL", "ICANON", "ICRNL", "IEXTEN", "IGNBRK", "IGNCR",
  "IGNPAR", "INCLR", "INPCK", "ISIG", "ISTRIP", "IXOFF", "IXON", "NCCS",
  "NOFLSH", "OPOST", "PARENB", "PARMRK", "PARODD", "TCIFLUSH", "TCIOFF",
  "TCIOFLUSH", "TCOFLUSH", "TCOOFF", "TCOON", "TCSADRAIN", "TCSAFLUSH",
  "TCSANOW", "TOSTOP", "VEOF", "VEOL", "VERASE", "VINTR", "VKILL", "VMIN",
  "VQUIT", "VSTART", "VSTOP", "VSUSP", "VTIME"
}

Definition at line 466 of file annexc.c.

const char testfmt[] [static]
Initial value:
"\
echo \"#include <unistd.h>\n#if !defined %s || %s == -1\n#error not defined\n#endif\n\" |\
%s -E -dM -D_POSIX_SOURCE %s \
-isystem `%s --print-prog-name=include` - 2> /dev/null > %s"

Definition at line 621 of file annexc.c.

const char* const time_maybe[] [static]
Initial value:
{
  "asctime", "asctime_r", "clock", "clock_getres", "clock_gettime",
  "clock_settime", "ctime", "ctime_r", "difftime", "gmtime", "gmtime_r",
  "localtime", "localtime_r", "mktime", "nanosleep", "strftime", "time",
  "timer_create", "timer_delete", "timer_getoverrun", "timer_gettime",
  "timer_settime", "tzset"
}

Definition at line 489 of file annexc.c.

const char* const time_syms[] [static]
Initial value:
{
  "CLK_TCK", "CLOCKS_PER_SEC", "CLOCK_REALTIME", "NULL", "TIMER_ABSTIME"
}

Definition at line 485 of file annexc.c.

const char* const times_maybe[] [static]
Initial value:
{
  "times"
}

Definition at line 432 of file annexc.c.

const char* const times_syms[] [static]
Initial value:
{
}

Definition at line 429 of file annexc.c.

const char* const types_maybe[] [static]
Initial value:
{
}

Definition at line 441 of file annexc.c.

const char* const types_syms[] [static]
Initial value:
{
}

Definition at line 438 of file annexc.c.

const char* const unistd_maybe[] [static]
Initial value:
{
  "_POSIX_ASYNCHRONOUS_IO", "_POSIX_ASYNC_IO", "_POSIX_CHOWN_RESTRICTED",
  "_POSIX_FSYNC", "_POSIX_JOB_CONTROL", "_POSIX_MAPPED_FILES",
  "_POSIX_MEMLOCK", "_POSIX_MEMLOCK_RANGE", "_MEMORY_PROTECTION",
  "_POSIX_MESSAGE_PASSING", "_POSIX_NO_TRUNC", "_POSIX_PRIORITIZED_IO",
  "_POSIX_PRIORITY_SCHEDULING", "_POSIX_PRIO_IO", "_POSIX_REATIME_SIGNALS",
  "_POSIX_SAVED_IDS", "_POSIX_SEMAPHORES", "_POSIX_SHARED_MEMORY_OBJECTS",
  "_POSIX_SYNCHRONIZED_IO", "_POSIX_SYNC_IO", "_POSIX_THREADS",
  "_POSIX_THREAD_ATTR_STACKADDR", "_POSIX_THREAD_ATTR_STACKSIZE",
  "_POSIX_THREAD_PRIO_INHERIT", "_POSIX_THREAD_PRIO_PROTECT",
  "_POSIX_THREAD_PROCESS_SHARED", "_POSIX_THREAD_SAFE_FUNCTIONS",
  "_POSIX_THREAD_PRIORITY_SCHEDULING", "_POSIX_TIMERS",
  "_POSIX_VDISABLE", "_POSIX_VERSION",
  "_exit", "access", "alarm", "chdir", "chown", "close", "ctermid", "cuserid",
  "dup2", "dup", "execl", "execle", "execlp", "execv", "execve", "execvp",
  "fdatasync", "fork", "fpathconf", "fsync", "ftruncate", "getcwd", "getegid",
  "geteuid", "getgid", "getgroups", "getlogin", "getlogin_r", "getpgrp",
  "getpid", "getppid", "getuid", "isatty", "link", "lseek", "pathconf",
  "pause", "pipe", "read", "rmdir", "setgid", "setgpid", "setsid", "setuid",
  "sleep", "sleep", "sysconf", "tcgetpgrp", "tcsetpgrp", "ttyname",
  "ttyname_r", "unlink", "write"
}

Definition at line 524 of file annexc.c.

const char* const unistd_syms[] [static]
Initial value:
{
  "F_OK", "NULL", "R_OK", "SEEK_CUR", "SEEK_END", "SEEK_SET", "STDERR_FILENO",
  "STDIN_FILENO", "STDOUT_FILENO", "W_OK", "X_OK",
  "_PC_ASYNC_IO", "_PC_CHOWN_RESTRICTED", "_PC_LINK_MAX", "_PC_MAX_CANON",
  "_PC_MAX_INPUT", "_PC_NAME_MAX", "_PC_NO_TRUNC", "_PC_PATH_MAX",
  "_PC_PIPE_BUF", "_PC_PRIO_IO", "_PC_SYNC_IO", "_PC_VDISABLE",
  "_SC_AIO_LISTIO_MAX", "_SC_AIO_MAX", "_SC_AIO_PRIO_DELTA_MAX",
  "_SC_ARG_MAX", "_SC_ASYNCHRONOUS_IO", "_SC_CHILD_MAX", "_SC_CLK_TCK",
  "_SC_DELAYTIMER_MAX", "_SC_FSYNC", "_SC_GETGR_R_SIZE_MAX",
  "_SC_GETPW_R_SIZE_MAX", "_SC_JOB_CONTROL", "_SC_LOGIN_NAME_MAX",
  "_SC_MAPPED_FILES", "_SC_MEMLOCK", "_SC_MEMLOCK_RANGE",
  "_SC_MEMORY_PROTECTION", "_SC_MESSAGE_PASSING", "_SC_MQ_OPEN_MAX",
  "_SC_MQ_PRIO_MAX", "_SC_NGROUPS_MAX", "_SC_OPEN_MAX", "_SC_PAGESIZE",
  "_SC_PRIORITIZED_IO", "_SC_PRIORITY_SCHEDULING", "_SC_REALTIME_SIGNALS",
  "_SC_RTSIG_MAX", "_SC_SAVED_IDS", "_SC_SEMAPHORES", "_SC_SEM_NSEMS_MAX",
  "_SC_SEM_VALUE_MAX", "_SC_SHARED_MEMORY_OBJECTS", "_SC_SIGQUEUE_MAX",
  "_SC_STREAM_MAX", "_SC_SYNCHRONIZED_IO", "_SC_THREADS",
  "_SC_THREAD_ATTR_STACKADDR", "_SC_THREAD_ATTR_STACKSIZE",
  "_SC_THREAD_DESTRUCTOR_ITERATIONS", "_SC_THREAD_PRIO_INHERIT",
  "_SC_THREAD_PRIORITY_SCHEDULING", "_SC_THREAD_PRIO_PROTECT",
  "_SC_THREAD_PROCESS_SHARED", "_SC_THREAD_SAFE_FUNCTIONS",
  "_SC_THREAD_STACK_MIN", "_SC_THREAD_THREADS_MAX", "_SC_TIMERS",
  "_SC_TIMER_MAX", "_SC_TTY_NAME_MAX", "_SC_TZNAME_MAX", "_SC_VERSION"
}

Definition at line 499 of file annexc.c.

const char* const utime_maybe[] [static]
Initial value:
{
  "utime"
}

Definition at line 552 of file annexc.c.

const char* const utime_syms[] [static]
Initial value:
{
}

Definition at line 549 of file annexc.c.

const char* const utsname_maybe[] [static]
Initial value:
{
  "uname"
}

Definition at line 449 of file annexc.c.

const char* const utsname_syms[] [static]
Initial value:
{
}

Definition at line 446 of file annexc.c.

const char* const wait_maybe[] [static]
Initial value:
{
  "wait", "waitpid"
}

Definition at line 460 of file annexc.c.

const char* const wait_syms[] [static]
Initial value:
{
  "WEXITSTATUS", "WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG",
  "WSTOPSIG", "WTERMSIG", "WUNTRACED"
}

Definition at line 455 of file annexc.c.