diff --git a/reactos/lib/3rdparty/3rdparty.rbuild b/reactos/lib/3rdparty/3rdparty.rbuild
index d5a8055c731..75bb1d1f154 100644
--- a/reactos/lib/3rdparty/3rdparty.rbuild
+++ b/reactos/lib/3rdparty/3rdparty.rbuild
@@ -4,30 +4,24 @@
-
-
-
diff --git a/reactos/lib/3rdparty/bzip2/bzip2.rbuild b/reactos/lib/3rdparty/bzip2/bzip2.rbuild
index 3437902a950..e5e172cd2a6 100644
--- a/reactos/lib/3rdparty/bzip2/bzip2.rbuild
+++ b/reactos/lib/3rdparty/bzip2/bzip2.rbuild
@@ -5,7 +5,6 @@
ntoskrnl
- hal
bzlib.c
randtable.c
crctable.c
diff --git a/reactos/lib/3rdparty/libwine/debug.c b/reactos/lib/3rdparty/libwine/debug.c
index 4dff5eae48c..b8e8c9ecb09 100644
--- a/reactos/lib/3rdparty/libwine/debug.c
+++ b/reactos/lib/3rdparty/libwine/debug.c
@@ -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;
}
diff --git a/reactos/lib/3rdparty/libxml2/libxml2.rbuild b/reactos/lib/3rdparty/libxml2/libxml2.rbuild
index 60ba9d42d09..327c3e6acc3 100644
--- a/reactos/lib/3rdparty/libxml2/libxml2.rbuild
+++ b/reactos/lib/3rdparty/libxml2/libxml2.rbuild
@@ -7,7 +7,6 @@
-
include
.
diff --git a/reactos/lib/3rdparty/mingw/crt1.c b/reactos/lib/3rdparty/mingw/crt1.c
index a4fb015d1e4..dec13337fb6 100644
--- a/reactos/lib/3rdparty/mingw/crt1.c
+++ b/reactos/lib/3rdparty/mingw/crt1.c
@@ -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");
diff --git a/reactos/lib/3rdparty/mingw/wcrt1.c b/reactos/lib/3rdparty/mingw/wcrt1.c
index df1cec8e3b2..28e933ba76b 100644
--- a/reactos/lib/3rdparty/mingw/wcrt1.c
+++ b/reactos/lib/3rdparty/mingw/wcrt1.c
@@ -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
diff --git a/reactos/lib/drivers/directory.rbuild b/reactos/lib/drivers/directory.rbuild
index c6a2b469c66..de283ec2cf0 100644
--- a/reactos/lib/drivers/directory.rbuild
+++ b/reactos/lib/drivers/directory.rbuild
@@ -4,14 +4,12 @@
-
diff --git a/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h b/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h
index bf687d22af2..1912a479109 100644
--- a/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h
+++ b/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/machine/endian.h
@@ -56,7 +56,6 @@
#include
#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.