Author: arty
Date: Mon Oct 15 07:56:58 2007
New Revision: 29591
URL:
http://svn.reactos.org/svn/reactos?rev=29591&view=rev
Log:
Fix quirks for building PPC on windows.
Modified:
trunk/reactos/include/reactos/wine/port.h
trunk/reactos/lib/ppcmmu/ppcmmu.mak
trunk/reactos/tools/ssprintf.cpp
trunk/reactos/tools/ssprintf.h
trunk/reactos/tools/xml.cpp
Modified: trunk/reactos/include/reactos/wine/port.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.…
==============================================================================
--- trunk/reactos/include/reactos/wine/port.h (original)
+++ trunk/reactos/include/reactos/wine/port.h Mon Oct 15 07:56:58 2007
@@ -286,7 +286,7 @@
# endif
#endif /* !defined(HAVE_STRCASECMP) */
-#ifndef HAVE_USLEEP
+#if !defined(HAVE_USLEEP) && !defined(__CYGWIN__)
int usleep (unsigned int useconds);
#endif /* !defined(HAVE_USLEEP) */
Modified: trunk/reactos/lib/ppcmmu/ppcmmu.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/ppcmmu/ppcmmu.mak?rev=…
==============================================================================
--- trunk/reactos/lib/ppcmmu/ppcmmu.mak (original)
+++ trunk/reactos/lib/ppcmmu/ppcmmu.mak Mon Oct 15 07:56:58 2007
@@ -2,32 +2,36 @@
S=lib/ppcmmu
CC=powerpc-unknown-elf-gcc -I$T/include/reactos/ppcmmu
AR=powerpc-unknown-elf-ar
+CFLAGS=-Iinclude/reactos/libs -Iinclude/crt -Iinclude/reactos -D__cdecl__=
OBJCOPY=powerpc-unknown-elf-objcopy
LDSCRIPT=-Wl,-T,$S/ldscript
PPCMMU_TARGETS=$O/libppcmmu_code.a
MMUOBJECT_OBJS=$O/devint.o $O/mmuobject.o $O/mmuutil_object.o $O/mmutest.o $O/gdblib.o
-$O/mmuutil_object.o: $S/mmuutil.c | $O
- $(CC) -Iinclude/reactos/libs -g -c -o $@ $S/mmuutil.c
+mkdir_ppcmmu:
+ -mkdir -p $O
-$O/libppcmmu_code.a: $(MMUOBJECT_OBJS) | $O
+$O/mmuutil_object.o: $S/mmuutil.c | mkdir_ppcmmu
+ $(CC) $(CFLAGS) -g -c -o $@ $S/mmuutil.c
+
+$O/libppcmmu_code.a: $(MMUOBJECT_OBJS)
$(CC) -Wl,-N -nostartfiles -nostdlib -o $O/mmuobject -Ttext=0x10000 $(LDSCRIPT)
-Wl,-u,mmumain -Wl,-u,data_miss_start -Wl,-u,data_miss_end $(MMUOBJECT_OBJS)
$(OBJCOPY) -O binary $O/mmuobject mmucode
$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common mmucode $O/mmucode.o
mkdir -p `dirname $@`
$(AR) cr $@ $O/mmucode.o
-$O/gdblib.o: $S/gdblib.c | $O
- $(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/gdblib.c
+$O/gdblib.o: $S/gdblib.c | mkdir_ppcmmu
+ $(CC) $(CFLAGS) -g -c -o $@ $S/gdblib.c
-$O/devint.o: $S/devint.s | $O
- $(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/devint.s
+$O/devint.o: $S/devint.s | mkdir_ppcmmu
+ $(CC) $(CFLAGS) -g -c -o $@ $S/devint.s
-$O/mmuobject.o: $S/mmuobject.c $S/mmuobject.h | $O
- $(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/mmuobject.c
+$O/mmuobject.o: $S/mmuobject.c $S/mmuobject.h | mkdir_ppcmmu
+ $(CC) $(CFLAGS) -g -c -o $@ $S/mmuobject.c
-$O/mmutest.o: $S/mmutest.c $S/mmuobject.h | $O
- $(CC) -Iinclude/reactos/libs -g -c -o $@ $S/mmutest.c
+$O/mmutest.o: $S/mmutest.c $S/mmuobject.h | mkdir_ppcmmu
+ $(CC) $(CFLAGS) -g -c -o $@ $S/mmutest.c
ppcmmuobject_clean:
rm -f $O/*.o $O/*.a mmucode $O/mmuobject
Modified: trunk/reactos/tools/ssprintf.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/ssprintf.cpp?rev=295…
==============================================================================
--- trunk/reactos/tools/ssprintf.cpp (original)
+++ trunk/reactos/tools/ssprintf.cpp Mon Oct 15 07:56:58 2007
@@ -37,7 +37,7 @@
#endif
#endif//WIN32
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
# define __isnan isnan
# define __finite finite
# define powl __builtin_powl
Modified: trunk/reactos/tools/ssprintf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/ssprintf.h?rev=29591…
==============================================================================
--- trunk/reactos/tools/ssprintf.h (original)
+++ trunk/reactos/tools/ssprintf.h Mon Oct 15 07:56:58 2007
@@ -19,6 +19,12 @@
#include <string>
#include <stdarg.h>
+#ifdef __CYGWIN__
+namespace std {
+ typedef basic_string<wchar_t> wstring;
+}
+#endif
+
std::string ssprintf ( const char* fmt, ... );
std::string ssvprintf ( const char* fmt, va_list args );
Modified: trunk/reactos/tools/xml.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/xml.cpp?rev=29591&am…
==============================================================================
--- trunk/reactos/tools/xml.cpp (original)
+++ trunk/reactos/tools/xml.cpp Mon Oct 15 07:56:58 2007
@@ -99,7 +99,7 @@
#ifdef WIN32
return _filelengthi64 ( _fileno(f) );
#else
-# if defined(__FreeBSD__) || defined(__APPLE__)
+# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
struct stat file_stat;
if ( fstat(fileno(f), &file_stat) != 0 )
# else