Changeset 2089 for trunk/src/libctests/glibc/stdio-common/tst-fseek.c
- Timestamp:
- Jun 27, 2005, 5:05:29 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libctests/glibc/stdio-common/tst-fseek.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2088 r2089 28 28 #include <sys/stat.h> 29 29 30 #ifndef HAVE_64BIT_FILEIO_TYPES 31 #define stat64 stat 32 #define fstat64 fstat 33 #endif 30 34 31 35 int … … 42 46 struct stat64 st2; 43 47 int result = 0; 48 #ifdef __EMX__ 49 extern int _fmode_bin; 50 _fmode_bin = 0; 51 #endif 44 52 45 53 tmpdir = getenv ("TMPDIR"); … … 47 55 tmpdir = "/tmp"; 48 56 57 #ifdef HAVE_ASPRINTF 49 58 asprintf (&fname, "%s/tst-fseek.XXXXXX", tmpdir); 59 #else 60 sprintf (buf, "%s/tst-fseek.XXXXXX", tmpdir); 61 fname = strdup(buf); 62 #endif 50 63 if (fname == NULL) 51 64 error (EXIT_FAILURE, errno, "cannot generate name for temporary file"); … … 56 69 error (EXIT_FAILURE, errno, "cannot open temporary file"); 57 70 58 fp = fdopen (fd, "w+ ");71 fp = fdopen (fd, "w+b"); 59 72 if (fp == NULL) 60 73 error (EXIT_FAILURE, errno, "cannot get FILE for temporary file"); … … 349 362 result = 1; 350 363 } 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... */ 351 366 if (st1.st_ctime >= st2.st_ctime) 352 367 { … … 359 374 result = 1; 360 375 } 376 #endif 361 377 } 362 378 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.