mingw fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7475 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-09-12 03:58:43 +00:00
parent 34edef037c
commit bc870f3681
6 changed files with 45 additions and 20 deletions

View file

@ -1,3 +1,16 @@
2000-09-11 Adam Fedor <fedor@gnu.org>
* Mingw fixes.
* Makefile.postamble (header-links): if MINGW, copy header files
to Foundation (Mingw's gcc can't handle links).
* Source/mframe/configure.in: Check target, not host.
* Source/NSDate.m (GSTimeNow): Fix typo.
* Source/NSData.m (readContentsOfFile): Fix up vars for MINGW.
(-writeToFile:atomically:): Likewise.
2000-09-11 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/gnustep/base/GSXML.h: new classes for parsing XML

View file

@ -74,11 +74,17 @@ after-distclean::
# Things to do after checking
# after-check::
ifeq ($(GNUSTEP_TARGET_OS), mingw32)
header-links: $(HEADER_LINK_DEPENDS)
-rm -f Headers/Foundation/*
-mkdir Headers/Foundation
cp -f Headers/gnustep/base/*.h Headers/Foundation
else
header-links: $(HEADER_LINK_DEPENDS)
-rm -f Headers/Foundation
-rm -f Source/Foundation
$(LN_S) gnustep/base Headers/Foundation
$(LN_S) ../Headers/gnustep/base Source/Foundation
endif
configure: configure.in
autoconf

View file

@ -119,14 +119,16 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len, NSZone* zone)
{
char thePath[BUFSIZ*2];
FILE *theFile = 0;
unsigned fileLength;
void *tmp = 0;
int c;
#if defined(__MINGW__)
HANDLE fh;
DWORD fileLength
DWORD fileLength;
DWORD fileSize;
DWORD high;
DWORD got;
#else
unsigned fileLength;
#endif
if ([path getFileSystemRepresentation: thePath
@ -617,6 +619,11 @@ failure:
char theRealPath[BUFSIZ*2];
FILE *theFile;
int c;
#if defined(__MINGW__)
HANDLE fh;
DWORD wroteBytes;
#endif
if ([path getFileSystemRepresentation: theRealPath
maxLength: sizeof(theRealPath)-1] == NO)
@ -626,9 +633,6 @@ failure:
}
#if defined(__MINGW__)
HANDLE fh;
DWORD wroteBytes;
if (useAuxiliaryFile)
{
path = [path stringByAppendingPathExtension: @"tmp"];
@ -772,6 +776,7 @@ failure:
if ([mgr changeFileAttributes: att atPath: path] == NO)
NSLog(@"Unable to correctly set all attributes for '%@'", path);
}
#ifndef __MINGW__
else if (geteuid() == 0 && [@"root" isEqualToString: NSUserName()] == NO)
{
att = [NSDictionary dictionaryWithObjectsAndKeys:
@ -779,6 +784,7 @@ failure:
if ([mgr changeFileAttributes: att atPath: path] == NO)
NSLog(@"Unable to correctly set ownership for '%@'", path);
}
#endif
}
/* success: */

View file

@ -142,7 +142,7 @@ GSTimeNow()
* Get current GMT time, convert to NSTimeInterval since reference date,
*/
GetSystemTime(&sys_time);
t = GSTime(sys_time.eDay, sys_time.wMonth, sys_time.wYear,
t = GSTime(sys_time.wDay, sys_time.wMonth, sys_time.wYear,
sys_time.wHour, sys_time.wMinute, sys_time.wSecond);
#endif
return t + sys_time.wMilliseconds / 1000.0;

View file

@ -659,10 +659,10 @@ test "$host_alias" != "$target_alias" &&
case "$target_cpu" in
alpha*) host_cpu=alpha;;
hppa*) host_cpu=hppa;;
i[456]86*) host_cpu=i386;;
sparc*) host_cpu=sparc;;
alpha*) target_cpu=alpha;;
hppa*) target_cpu=hppa;;
i[3456]86*) target_cpu=i386;;
sparc*) target_cpu=sparc;;
esac
case "$target_os" in
@ -671,9 +671,9 @@ case "$target_os" in
esac
if test -d $host_cpu -a "`echo $host_cpu/*`" != "$host_cpu/*"
if test -d $target_cpu -a "`echo $target_cpu/*`" != "$target_cpu/*"
then
my_dir=$host_cpu
my_dir=$target_cpu
else
echo '*************** Warning ****************'
echo The 'mframe' software has not been ported to $target_cpu.

View file

@ -31,10 +31,10 @@ AC_CANONICAL_SYSTEM
dnl Checking CPU and Operating-System information for mframe.h
case "$target_cpu" in
alpha*) host_cpu=alpha;;
hppa*) host_cpu=hppa;;
i[[456]]86*) host_cpu=i386;;
sparc*) host_cpu=sparc;;
alpha*) target_cpu=alpha;;
hppa*) target_cpu=hppa;;
i[[3456]]86*) target_cpu=i386;;
sparc*) target_cpu=sparc;;
esac
case "$target_os" in
@ -43,9 +43,9 @@ case "$target_os" in
esac
if test -d $host_cpu -a "`echo $host_cpu/*`" != "$host_cpu/*"
if test -d $target_cpu -a "`echo $target_cpu/*`" != "$target_cpu/*"
then
my_dir=$host_cpu
my_dir=$target_cpu
else
echo '*************** Warning ****************'
echo The 'mframe' software has not been ported to $target_cpu.