changed header files from djgpp to mingw32

svn path=/trunk/; revision=263
This commit is contained in:
Boudewijn Dekker 1999-02-21 13:48:57 +00:00
parent eef71ffb98
commit f929f4c00b
10 changed files with 10 additions and 59 deletions

View file

@ -2,8 +2,7 @@
#include <windows.h>
#include <ctype.h>
char _SetCurrentDirectory(char *dir);
int _GetCurrentDirectory(int count,char *buffer);
#undef chdir
int chdir( const char *_path )

View file

@ -5,7 +5,7 @@
static char msg[] = "Abort!\r\n";
void
abort()
abort(void)
{
_write(stderr->_file, msg, sizeof(msg)-1);
_exit(1);

View file

@ -2,7 +2,7 @@
#include <stdlib.h>
int
abs(int j)
abs(int _i)
{
return j<0 ? -j : j;
return _i<0 ? -_i : _i;
}

View file

@ -1,5 +1,6 @@
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdlib.h>
#include <string.h>
long double
_atold(const char *ascii)

View file

@ -173,7 +173,7 @@ qst(char *base, char *max)
*/
void
qsort(void *base0, size_t n, size_t size, int (*compar)(const void *, const void *))
qsort(const void *base0, size_t n, size_t size, _pfunccmp_t compar)
{
char *base = (char *)base0;
char c, *i, *j, *lo, *hi;

View file

@ -3,7 +3,6 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
//#include <libc/unconst.h>
char __syserr00[] = "No Error";

View file

@ -20,7 +20,7 @@ fstat(int handle, struct stat *statbuf)
return -1;
}
if ( !GetFileInformationByHandle(filehnd(handle),&FileInformation) )
if ( !GetFileInformationByHandle(_get_osfhandle(handle),&FileInformation) )
return -1;
statbuf->st_ctime = FileTimeToUnixTime( &FileInformation.ftCreationTime,NULL);
statbuf->st_atime = FileTimeToUnixTime( &FileInformation.ftLastAccessTime,NULL);

View file

@ -37,22 +37,7 @@ static char sccsid[] = "@(#)ctime.c 5.23 (Berkeley) 6/22/90";
*/
#ifndef _TM_DEFINED
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
char *tm_zone;
int tm_gmtoff;
};
#define _TM_DEFINED
#endif
//#include <libc/stubs.h>
#include <fcntl.h>

View file

@ -1,22 +1,5 @@
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <string.h>
#ifndef _TM_DEFINED
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
char *tm_zone;
int tm_gmtoff;
};
#define _TM_DEFINED
#endif
#include <time.h>
#define TM_YEAR_BASE 1900

View file

@ -1,20 +1,5 @@
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef _TM_DEFINED
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
char *tm_zone;
int tm_gmtoff;
};
#define _TM_DEFINED
#endif
#include <time.h>
#include <windows.h>
@ -25,6 +10,5 @@ time(time_t *t)
{
SYSTEMTIME SystemTime;
GetLocalTime(&SystemTime);
}