Ignore:
Timestamp:
Jun 27, 2005, 5:05:29 AM (20 years ago)
Author:
bird
Message:

testcase adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libctests/glibc/stdio-common/tst-fseek.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2088 r2089  
    2828#include <sys/stat.h>
    2929
     30#ifndef HAVE_64BIT_FILEIO_TYPES
     31#define stat64 stat
     32#define fstat64 fstat
     33#endif
    3034
    3135int
     
    4246  struct stat64 st2;
    4347  int result = 0;
     48#ifdef __EMX__
     49   extern int _fmode_bin;
     50   _fmode_bin = 0;
     51#endif
    4452
    4553  tmpdir = getenv ("TMPDIR");
     
    4755    tmpdir = "/tmp";
    4856
     57#ifdef HAVE_ASPRINTF
    4958  asprintf (&fname, "%s/tst-fseek.XXXXXX", tmpdir);
     59#else
     60  sprintf (buf, "%s/tst-fseek.XXXXXX", tmpdir);
     61  fname = strdup(buf);
     62#endif
    5063  if (fname == NULL)
    5164    error (EXIT_FAILURE, errno, "cannot generate name for temporary file");
     
    5669    error (EXIT_FAILURE, errno, "cannot open temporary file");
    5770
    58   fp = fdopen (fd, "w+");
     71  fp = fdopen (fd, "w+b");
    5972  if (fp == NULL)
    6073    error (EXIT_FAILURE, errno, "cannot get FILE for temporary file");
     
    349362              result = 1;
    350363            }
     364#ifndef __EMX__ /* TODO: figure out what the hell they are getting at here. There's not writing or
     365                         anything which should case any of those two to be changed... */
    351366          if (st1.st_ctime >= st2.st_ctime)
    352367            {
     
    359374              result = 1;
    360375            }
     376#endif
    361377        }
    362378    }
Note: See TracChangeset for help on using the changeset viewer.