[ros-diffs] [sserapion] 34745: libwine: -use InterlockedExchangeAdd instead of interlocked_xchg_add libxml2: -WINSOCKETAPI already defined in config.h no need to redefine mingw_base: -rework _fmode refernces to allow ros64 programs to work on win64. -temporarily hack _wenviron to allow programs to work on win64. -aling stack to 16bytes oskit: -remove inline asm per suggestion by arty

sserapion at svn.reactos.org sserapion at svn.reactos.org
Thu Jul 24 16:32:35 CEST 2008


Author: sserapion
Date: Thu Jul 24 09:32:35 2008
New Revision: 34745

URL: http://svn.reactos.org/svn/reactos?rev=34745&view=rev
Log:
libwine:
-use InterlockedExchangeAdd instead of interlocked_xchg_add
libxml2:
-WINSOCKETAPI already defined in config.h no need to redefine
mingw_base:
-rework _fmode refernces to allow ros64 programs to work on win64.
-temporarily hack _wenviron to allow programs to work on win64.
-aling stack to 16bytes
oskit:
-remove inline asm per suggestion by arty

Modified:
    branches/ros-amd64-bringup/reactos/lib/3rdparty/3rdparty.rbuild
    branches/ros-amd64-bringup/reactos/lib/3rdparty/bzip2/bzip2.rbuild
    branches/ros-amd64-bringup/reactos/lib/3rdparty/libwine/debug.c
    branches/ros-amd64-bringup/reactos/lib/3rdparty/libxml2/libxml2.rbuild
    branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c
    branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c
    branches/ros-amd64-bringup/reactos/lib/drivers/directory.rbuild
    branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/3rdparty.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/3rdparty.rbuild?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -4,30 +4,24 @@
 	<directory name="adns">
 		<xi:include href="adns/adns.rbuild" />
 	</directory>
-<!--
 	<directory name="bzip2">
 		<xi:include href="bzip2/bzip2.rbuild" />
 	</directory>
--->
 	<directory name="expat">
 		<xi:include href="expat/expat.rbuild" />
 	</directory>
 	<directory name="icu4ros">
 		<xi:include href="icu4ros/icu4ros.rbuild" />
 	</directory>
-<!--
 	<directory name="libwine">
 		<xi:include href="libwine/libwine.rbuild" />
 	</directory>
--->
 	<directory name="libxml2">
 		<xi:include href="libxml2/libxml2.rbuild" />
 	</directory>
-<!--
 	<directory name="mingw">
 		<xi:include href="mingw/mingw.rbuild" />
 	</directory>
--->
 	<directory name="zlib">
 		<xi:include href="zlib/zlib.rbuild" />
 	</directory>

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/bzip2/bzip2.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/bzip2/bzip2.rbuild?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/bzip2/bzip2.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/bzip2/bzip2.rbuild [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -5,7 +5,6 @@
 	<define name="BZ_NO_STDIO" />
 	<define name="BZ_DECOMPRESS_ONLY" />
 	<library>ntoskrnl</library>
-	<library>hal</library>
 	<file>bzlib.c</file>
 	<file>randtable.c</file>
 	<file>crctable.c</file>

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/libwine/debug.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/libwine/debug.c?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/libwine/debug.c [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -256,7 +256,7 @@
     char *ret;
     int idx;
 
-    idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
+    idx = InterlockedExchangeAdd( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
     if ((ret = realloc( list[idx], size ))) list[idx] = ret;
     return ret;
 }

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/libxml2/libxml2.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/libxml2/libxml2.rbuild?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/libxml2/libxml2.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/libxml2/libxml2.rbuild [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -7,7 +7,6 @@
 	<define name="_MBCS" />
 	<define name="HAVE_WIN32_THREADS" />
 	<define name="_REENTRANT" />
-	<define name="_WINSOCKAPI_" />
 	<define name="LIBXML_STATIC" />
 	<include base="libxml2">include</include>
 	<include base="libxml2">.</include>

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -47,14 +47,6 @@
 void __set_app_type(int);
 #endif /* __MSVCRT__ */
 
-/*  Global _fmode for this .exe, not the one in msvcrt.dll,
-    The default is set in txtmode.o in libmingw32.a */
-/* Override the dllimport'd declarations in stdlib.h */
-#undef _fmode
-extern int _fmode;
-#ifdef __MSVCRT__
-extern int* __p__fmode(void); /* To access the dll _fmode */
-#endif
 
 /*
  * Setup the default file handles to have the _CRT_fmode mode, as well as
@@ -68,7 +60,7 @@
   /* Don't set the std file mode if the user hasn't set any value for it. */
   if (_CRT_fmode)
     {
-      _fmode = _CRT_fmode;
+      *_imp___fmode = _CRT_fmode;
 
       /*
        * This overrides the default file mode settings for stdin,
@@ -93,7 +85,7 @@
 
     /*  Now sync  the dll _fmode to the  one for this .exe.  */
 #ifdef __MSVCRT__
-    *__p__fmode() = _fmode;
+    *_imp___fmode = _fmode;
 #else
     *_imp___fmode_dll = _fmode;
 #endif
@@ -224,6 +216,9 @@
   /* Align the stack to 16 bytes for the sake of SSE ops in main
      or in functions inlined into main.  */
   asm  __volatile__  ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__x86_64__)
+  /* Align the stack to 16 bytes */
+  asm  __volatile__  ("andq $-16, %%rsp" : : : "%rsp");
 #elif defined(__mips__)
   /* Align the stack to 16 bytes */
   asm  __volatile__  ("andi %sp,%sp,-16" : : : "%sp");

Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -45,14 +45,6 @@
 __MINGW_IMPORT void __set_app_type(int);
 #endif /* __MSVCRT__ */
 
-/*  Global _fmode for this .exe, not the one in msvcrt.dll,
-    The default is set in txtmode.o in libmingw32.a */
-/* Override the dllimport'd declarations in stdlib.h */
-#undef _fmode
-extern int _fmode;
-#ifdef __MSVCRT__
-extern int* __p__fmode(void); /* To access the dll _fmode */
-#endif
 
 /*
  * Setup the default file handles to have the _CRT_fmode mode, as well as
@@ -66,7 +58,7 @@
   /* Don't set the std file mode if the user hasn't set any value for it. */
   if (_CRT_fmode)
     {
-      _fmode = _CRT_fmode;
+      *_imp___fmode = _CRT_fmode;
 
       /*
        * This overrides the default file mode settings for stdin,
@@ -91,7 +83,7 @@
 
     /*  Now sync  the dll _fmode to the  one for this .exe.  */
 #ifdef __MSVCRT__
-    *__p__fmode() = _fmode;
+    *_imp___fmode = _fmode;
 #else
     *_imp___fmode_dll = _fmode;
 #endif
@@ -222,6 +214,9 @@
   /* Align the stack to 16 bytes for the sake of SSE ops in main
      or in functions inlined into main.  */
   asm  __volatile__  ("andl $-16, %%esp" : : : "%esp");
+#elif defined(__x86_64__)
+  /* Align the stack to 16 bytes */
+  asm  __volatile__  ("andq $-16, %%rsp" : : : "%rsp");
 #elif defined(__mips__)
   /* Align the stack to 16 bytes */
   asm  __volatile__  ("andi %sp,%sp,-16" : : : "%sp");
@@ -238,7 +233,7 @@
    * that one calls WinMain. See main.c in the 'lib' dir
    * for more details.
    */
-  nRet = wmain (_argc, _wargv, _wenviron);
+  nRet = wmain (_argc, _wargv, NULL);
 
   /*
    * Perform exit processing for the C library. This means

Modified: branches/ros-amd64-bringup/reactos/lib/drivers/directory.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/drivers/directory.rbuild?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/drivers/directory.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/drivers/directory.rbuild [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -4,14 +4,12 @@
 	<directory name="csq">
 		<xi:include href="csq/csq.rbuild" />
 	</directory>
-<!--
 	<directory name="ip">
 		<xi:include href="ip/ip.rbuild" />
 	</directory>
 	<directory name="oskittcp">
 		<xi:include href="oskittcp/oskittcp.rbuild" />
 	</directory>
--->
 	<directory name="chew">
 		<xi:include href="chew/chew.rbuild" />
 	</directory>

Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h [iso-8859-1] Thu Jul 24 09:32:35 2008
@@ -56,7 +56,6 @@
 #include <sys/cdefs.h>
 #endif
 
-#ifdef _MSC_VER
 static inline unsigned long __byte_swap_long ( unsigned long i )
 {
 	char dst[4];
@@ -76,41 +75,6 @@
 	dst[1] = src[0];
 	return *(unsigned short*)&dst[0];
 }
-#else/*_MSC_VER*/
-#define __word_swap_long(x) \
-({ register u_long __X = (x); \
-   __asm ("rorl $16, %1" \
-	: "=r" (__X) \
-	: "0" (__X)); \
-   __X; })
-#if __GNUC__ >= 2
-#define __byte_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
-   __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
-	: "=q" (__X) \
-	: "0" (__X)); \
-   __X; })
-#define __byte_swap_word(x) \
-__extension__ ({ register u_short __X = (x); \
-   __asm ("xchgb %h1, %b1" \
-	: "=q" (__X) \
-	: "0" (__X)); \
-   __X; })
-#else /* __GNUC__ >= 2 */
-#define __byte_swap_long(x) \
-({ register u_long __X = (x); \
-   __asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
-	: "=r" (__X) \
-	: "0" (__X)); \
-   __X; })
-#define __byte_swap_word(x) \
-({ register u_short __X = (x); \
-   __asm ("rorw $8, %w1" \
-	: "=r" (__X) \
-	: "0" (__X)); \
-   __X; })
-#endif /* __GNUC__ >= 2 */
-#endif /* _MSC_VER */
 
 /*
  * Macros for network/external number representation conversion.



More information about the Ros-diffs mailing list