Commit 15f96804 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Replaced architecture-dependent configure checks by hardcoded

definitions in winnt.h (to avoid config.h dependency).
parent d4be9197
...@@ -773,44 +773,6 @@ then ...@@ -773,44 +773,6 @@ then
AC_DEFINE(NO_REENTRANT_X11) AC_DEFINE(NO_REENTRANT_X11)
fi fi
dnl **** Check for endianness ****
AC_C_BIGENDIAN
AC_CACHE_CHECK( "whether bitfields are bigendian", wine_cv_bitfields_bigendian,
[AC_TRY_RUN([
union
{
int word;
struct
{
int bit0 : 1;
int rest : sizeof(int)*8 - 1;
} bitfield;
} u;
main() { u.word = 0; u.bitfield.bit0 = 1; exit( u.word == 1 ); } ],
wine_cv_bitfields_bigendian=yes, wine_cv_bitfields_bigendian=no,
wine_cv_bitfields_bigendian=no ) ])
if test "$wine_cv_bitfields_bigendian" = "yes"
then
AC_DEFINE(BITFIELDS_BIGENDIAN)
fi
AC_CACHE_CHECK( "whether unaligned memory access is allowed", wine_cv_allow_unaligned_access,
[AC_TRY_RUN([
long volatile test[2];
main()
{
long volatile *ua = (long volatile *)((char *)test + 1);
*ua = 0;
exit(0);
} ], wine_cv_allow_unaligned_access=yes, wine_cv_allow_unaligned_access=no,
wine_cv_allow_unaligned_access=no ) ])
if test "$wine_cv_allow_unaligned_access" = "yes"
then
AC_DEFINE(ALLOW_UNALIGNED_ACCESS)
fi
dnl **** Check for functions **** dnl **** Check for functions ****
......
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
* defined in the 'configure' script. * defined in the 'configure' script.
*/ */
/* Define if bitfields are bigendian */
#undef BITFIELDS_BIGENDIAN
/* Define if unaligned memory access is allowed */
#undef ALLOW_UNALIGNED_ACCESS
/* Define if .type asm directive must be inside a .def directive */ /* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF #undef NEED_TYPE_IN_DEF
......
...@@ -37,22 +37,12 @@ ...@@ -37,22 +37,12 @@
/* Define if you have the ANSI C header files. */ /* Define if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the X Window System is missing or not being used. */ /* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING #undef X_DISPLAY_MISSING
/* Define if lex declares yytext as a char * by default, not a char[]. */ /* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER #undef YYTEXT_POINTER
/* Define if bitfields are bigendian */
#undef BITFIELDS_BIGENDIAN
/* Define if unaligned memory access is allowed */
#undef ALLOW_UNALIGNED_ACCESS
/* Define if .type asm directive must be inside a .def directive */ /* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF #undef NEED_TYPE_IN_DEF
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define __WINE_WINE_PORT_H #define __WINE_WINE_PORT_H
#include "config.h" #include "config.h"
#include "winnt.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
......
...@@ -27,6 +27,21 @@ ...@@ -27,6 +27,21 @@
/**** Some Wine specific definitions *****/ /**** Some Wine specific definitions *****/
/* Architecture dependent settings. */
/* These are hardcoded to avoid dependencies on config.h in Winelib apps. */
#if defined(__i386__)
# undef WORDS_BIGENDIAN
# undef BITFIELDS_BIGENDIAN
# define ALLOW_UNALIGNED_ACCESS
#elif defined(__sparc__)
# define WORDS_BIGENDIAN
# define BITFIELDS_BIGENDIAN
# undef ALLOW_UNALIGNED_ACCESS
#elif !defined(RC_INVOKED)
# error Unknown CPU architecture!
#endif
/* Calling conventions definitions */ /* Calling conventions definitions */
#ifdef __i386__ #ifdef __i386__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment