X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fddconfig_in.h;h=054a0c85dd0dbc7f467e43cf979298f9343f3fcb;hb=a446a63f24e77a9806413bada4604eb098f06122;hp=5118a35c9d6c0372005927c4a60b29c6250ecc92;hpb=8099f93e7346ce1e8d20177553ee7a8f8d2c0a4d;p=fw%2Fsdcc diff --git a/sim/ucsim/ddconfig_in.h b/sim/ucsim/ddconfig_in.h index 5118a35c..054a0c85 100644 --- a/sim/ucsim/ddconfig_in.h +++ b/sim/ucsim/ddconfig_in.h @@ -2,7 +2,7 @@ * Simulator of microcontrollers (ddconfig.h) * * Copyright (C) 1999,99 Drotos Daniel, Talker Bt. - * + * * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu * */ @@ -30,7 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define DD_TRUE 1 #define DD_FALSE 0 -#define bool int +#define NIL 0 #undef STDC_HEADERS #undef HAVE_GETOPT_H @@ -38,15 +38,22 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef HAVE_DIRENT_H #undef HAVE_SYS_NDIR_H #undef HAVE_SYS_DIR_H -#undef HAVE_SYS_SOCKET_H #undef HAVE_NDIR_H +#undef HAVE_SYS_SOCKET_H +#undef HAVE_WINSOCK2_H +#undef HAVE_DLFCN_H +#undef HAVE_CURSES_H +#undef HAVE_TERMIOS_H #undef SOCKET_AVAIL #undef SOCKLEN_T +#undef UCSOCKET_T +#undef HEADER_SOCKET #undef FD_NEED_TIME_H #undef FD_NEED_TYPES_H #undef FD_NEED_SELECT_H +#undef FD_NEED_WINSOCK2_H #undef HEADER_FD #undef FD_HEADER_OK @@ -68,6 +75,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef HAVE_VPRINTF #undef HAVE_DOPRNT #undef HAVE_VSNPRINTF +#undef HAVE__VSNPRINTF #undef HAVE_VASPRINTF #undef HAVE_GETLINE @@ -75,6 +83,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef HAVE_FGETS #undef HAVE_YYLEX +#undef HAVE_FLEX +#undef YYTEXT_POINTER #undef RETSIGTYPE #undef SIZEOF_CHAR @@ -88,7 +98,31 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define TYPE_UBYTE unsigned TYPE_BYTE #define TYPE_UWORD unsigned TYPE_WORD #define TYPE_UDWORD unsigned TYPE_DWORD -#undef WORDS_BIGENDIAN +#undef _M_ +#undef _A_ + +/* + * find out the endianess of host machine + * in order to be able to make Mac OS X unified binaries + */ +#if __BIG_ENDIAN__ || _BIG_ENDIAN +/* 1) trust the compiler */ +# define WORDS_BIGENDIAN 1 +#elif __LITTLE_ENDIAN__ +/* do nothing */ +#elif (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +/* 2) trust the header files */ +# if BYTE_ORDER == BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +# endif +#else +/* 3) trust the configure; this actually doesn't work for unified Mac OS X binaries :-( */ +# undef BUILD_WORDS_BIGENDIAN +# if (defined BUILD_WORDS_BIGENDIAN && BUILD_WORDS_BIGENDIAN) +# define WORDS_BIGENDIAN 1 +# endif +/* 4) assume that host is a little endian machine */ +#endif #undef VERSIONSTR #undef VERSIONHI @@ -97,6 +131,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef ACCEPT_SOCKLEN_T +#undef STATISTIC + #endif /* End of ddconfig.h */