mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
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 svn path=/branches/ros-amd64-bringup/; revision=34745
This commit is contained in:
Vendored
-6
@@ -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>
|
||||
|
||||
-1
@@ -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>
|
||||
|
||||
Vendored
+1
-1
@@ -256,7 +256,7 @@ static char *get_temp_buffer( size_t size )
|
||||
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;
|
||||
}
|
||||
|
||||
-1
@@ -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>
|
||||
|
||||
Vendored
+5
-10
@@ -47,14 +47,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
|
||||
@@ -68,7 +60,7 @@ _mingw32_init_fmode (void)
|
||||
/* 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 @@ _mingw32_init_fmode (void)
|
||||
|
||||
/* 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 @@ __mingw_CRTStartup (void)
|
||||
/* 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");
|
||||
|
||||
Vendored
+6
-11
@@ -45,14 +45,6 @@ extern int wmain (int, wchar_t **, wchar_t **);
|
||||
__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 @@ _mingw32_init_fmode (void)
|
||||
/* 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 @@ _mingw32_init_fmode (void)
|
||||
|
||||
/* 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 @@ __mingw_wCRTStartup (void)
|
||||
/* 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 @@ __mingw_wCRTStartup (void)
|
||||
* 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 @@ static inline unsigned short __byte_swap_word ( unsigned short i )
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user