Ignore:
Timestamp:
Jul 1, 2005, 6:20:01 AM (20 years ago)
Author:
bird
Message:

libc adjustments / config.

Location:
trunk/src/libctests/glibc/posix
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libctests/glibc/posix/bug-glob2.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2134 r2135  
    2323#include <dirent.h>
    2424#include <glob.h>
    25 #ifdef HAVE_MCHECK_H
    2625#include <mcheck.h>
    27 #endif
    2826#include <stdlib.h>
    2927#include <stdio.h>
     
    270268do_test (void)
    271269{
    272 #ifdef HAVE_MCHECK_H
    273270  mtrace ();
    274 #endif
    275271
    276272  glob_t gl;
     
    299295  globfree (&gl);
    300296
    301 #ifdef HAVE_MCHECK_H
    302297  muntrace ();
    303 #endif
    304298
    305299  return 0;
  • trunk/src/libctests/glibc/posix/bug-regex1.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r2134 r2135  
    1818
    1919  setlocale (LC_ALL, "de_DE.ISO-8859-1");
    20 #ifdef HAVE_FWIDE
    2120  fwide (stdout, -1);
    2221
  • trunk/src/libctests/glibc/posix/runptests.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    4343  size_t cnt;
    4444  int errors = 0;
     45  int errors_expected = argc > 1 ? atoi(argv[argc - 1]) : 0;
    4546
    4647  for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt)
     
    118119      }
    119120
    120   printf ("\n%Zu tests, %d errors\n", cnt, errors);
     121  printf ("\n%Zu tests, %d errors, expected %d\n", cnt, errors, errors_expected);
    121122
    122   return errors != 0;
     123  return errors != errors_expected;
    123124}
  • trunk/src/libctests/glibc/posix/tst-chmod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    2929#include <unistd.h>
    3030#include <sys/stat.h>
     31
     32#ifndef HAVE_64BIT_FILEIO_TYPES
     33#define stat64 stat
     34#define fstat64 fstat
     35#endif
    3136
    3237
  • trunk/src/libctests/glibc/posix/tst-dir.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    2828#include <unistd.h>
    2929#include <sys/stat.h>
     30
     31#ifndef HAVE_64BIT_FILEIO_TYPES
     32#define stat64 stat
     33#define fstat64 fstat
     34#define dirent64 dirent
     35#define readdir64_r readdir_r
     36#define readdir64 readdir
     37#endif
     38#ifdef __EMX__
     39#warning fchdir still not implemented?
     40#define fchdir(fd) (-1)
     41#endif
    3042
    3143
  • trunk/src/libctests/glibc/posix/tst-exec.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    142142    {
    143143      if (argc != 4)
    144         error (EXIT_FAILURE, 0, "wrong number of arguments (%d)", argc);
     144        error (EXIT_FAILURE, 0, "wrong number of arguments (%d) argv[0]=%s argv[1]=%s argv[2]=%s argv[3]=%s argv[4]=%s argv[5]=%s argv[6]=%s argv[7]=%s argv[8]=%s",
     145               argc, argc > 0 ? argv[0] : "<null>", argc > 1 ? argv[1] : "<null>", argc > 2 ? argv[2] : "<null>", argc > 3 ? argv[3] : "<null>",
     146               argc > 4 ? argv[4] : "<null>", argc > 5 ? argv[5] : "<null>", argc > 6 ? argv[6] : "<null>", argc > 7 ? argv[7] : "<null>",
     147               argc > 8 ? argv[8] : "<null>");
    145148
    146149      return handle_restart (argv[1], argv[2], argv[3]);
     
    148151
    149152  if (argc != 5)
    150     error (EXIT_FAILURE, 0, "wrong number of arguments (%d)", argc);
     153    error (EXIT_FAILURE, 0, "wrong number of arguments (%d) argv[0]=%s argv[1]=%s argv[2]=%s argv[3]=%s argv[4]=%s",
     154           argc, argc > 0 ? argv[0] : "<null>", argc > 1 ? argv[1] : "<null>", argc > 2 ? argv[2] : "<null>",
     155           argc > 3 ? argv[3] : "<null>", argc > 4 ? argv[4] : "<null>");
    151156
    152157  /* Prepare the test.  We are creating two files: one which file descriptor
  • trunk/src/libctests/glibc/posix/tst-execvp3.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    2020{
    2121  int fd = create_temp_file ("testscript", &fname);
     22#if 0
    2223  dprintf (fd, "echo foo\n");
    2324  fchmod (fd, 0700);
    2425  close (fd);
     26#else
     27  FILE *pf = fdopen (fd, "w+");
     28  fprintf (pf, "echo foo\n");
     29  fflush (pf);
     30  fchmod (fd, 0700);
     31  fclose (pf);
     32#endif
    2533}
    2634
  • trunk/src/libctests/glibc/posix/tst-fnmatch.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2134 r2135  
    264264          len = 8;
    265265        }
     266#ifdef FNM_EXTMATCH
    266267      else if (strncasecmp (str, "EXTMATCH", 8) == 0
    267268               && (str[8] == '|' || str[8] == '\0'))
     
    270271          len = 8;
    271272        }
     273#else
     274#warning "FNM_EXTMATCH isn't defined!"
     275#endif
    272276      else
    273277        return -1;
     
    322326      first = 0;
    323327    }
     328#ifdef FNM_EXTMATCH
    324329  if (flags & FNM_EXTMATCH)
    325330    {
     
    329334      first = 0;
    330335    }
     336#else
     337#warning "FNM_EXTMATCH isn't defined!"
     338#endif
    331339  if (cp == buf)
    332340    *cp++ = '0';
Note: See TracChangeset for help on using the changeset viewer.