Changeset 10848 for trunk/mgpp
- Timestamp:
- 2005-11-07T13:13:45+13:00 (18 years ago)
- Location:
- trunk/mgpp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mgpp/config.h.in
r7945 r10848 204 204 #undef ENABLE_NLS 205 205 206 /* Define if big endian */ 207 #undef WORDS_BIGENDIAN 208 206 209 #endif /* _MGPP_CONFIG_H */ -
trunk/mgpp/configure
r10192 r10848 310 310 #endif" 311 311 312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT AWK YACC CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP U ANSI2KNR ALLOCA LIBOBJS JNIINC JNISUFFIX JNIFLAGS L IBOBJS LTLIBOBJS'312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT AWK YACC CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP U ANSI2KNR ALLOCA LIBOBJS JNIINC JNISUFFIX JNIFLAGS LTLIBOBJS' 313 313 ac_subst_files='' 314 314 … … 6427 6427 _ACEOF 6428 6428 6429 LIBOBJS="$LIBOBJS regex.o" 6429 case $LIBOBJS in 6430 "regex.$ac_objext" | \ 6431 *" regex.$ac_objext" | \ 6432 "regex.$ac_objext "* | \ 6433 *" regex.$ac_objext "* ) ;; 6434 *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;; 6435 esac 6436 6430 6437 fi 6431 6438 fi; … … 6948 6955 find a local rx library and the one included with this 6949 6956 distribution doesn't work on 64-bit machines like yours" >&2;} 6950 LIBOBJS="$LIBOBJS regex.o" 6957 case $LIBOBJS in 6958 "regex.$ac_objext" | \ 6959 *" regex.$ac_objext" | \ 6960 "regex.$ac_objext "* | \ 6961 *" regex.$ac_objext "* ) ;; 6962 *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;; 6963 esac 6964 6951 6965 else 6952 LIBOBJS="$LIBOBJS rx.o" 6966 case $LIBOBJS in 6967 "rx.$ac_objext" | \ 6968 *" rx.$ac_objext" | \ 6969 "rx.$ac_objext "* | \ 6970 *" rx.$ac_objext "* ) ;; 6971 *) LIBOBJS="$LIBOBJS rx.$ac_objext" ;; 6972 esac 6973 6953 6974 fi 6954 6975 … … 7272 7293 7273 7294 7295 # text for endianness 7296 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 7297 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 7298 if test "${ac_cv_c_bigendian+set}" = set; then 7299 echo $ECHO_N "(cached) $ECHO_C" >&6 7300 else 7301 # See if sys/param.h defines the BYTE_ORDER macro. 7302 cat >conftest.$ac_ext <<_ACEOF 7303 /* confdefs.h. */ 7304 _ACEOF 7305 cat confdefs.h >>conftest.$ac_ext 7306 cat >>conftest.$ac_ext <<_ACEOF 7307 /* end confdefs.h. */ 7308 #include <sys/types.h> 7309 #include <sys/param.h> 7310 7311 int 7312 main () 7313 { 7314 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 7315 bogus endian macros 7316 #endif 7317 7318 ; 7319 return 0; 7320 } 7321 _ACEOF 7322 rm -f conftest.$ac_objext 7323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7324 (eval $ac_compile) 2>conftest.er1 7325 ac_status=$? 7326 grep -v '^ *+' conftest.er1 >conftest.err 7327 rm -f conftest.er1 7328 cat conftest.err >&5 7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7330 (exit $ac_status); } && 7331 { ac_try='test -z "$ac_c_werror_flag" 7332 || test ! -s conftest.err' 7333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7334 (eval $ac_try) 2>&5 7335 ac_status=$? 7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7337 (exit $ac_status); }; } && 7338 { ac_try='test -s conftest.$ac_objext' 7339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7340 (eval $ac_try) 2>&5 7341 ac_status=$? 7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7343 (exit $ac_status); }; }; then 7344 # It does; now see whether it defined to BIG_ENDIAN or not. 7345 cat >conftest.$ac_ext <<_ACEOF 7346 /* confdefs.h. */ 7347 _ACEOF 7348 cat confdefs.h >>conftest.$ac_ext 7349 cat >>conftest.$ac_ext <<_ACEOF 7350 /* end confdefs.h. */ 7351 #include <sys/types.h> 7352 #include <sys/param.h> 7353 7354 int 7355 main () 7356 { 7357 #if BYTE_ORDER != BIG_ENDIAN 7358 not big endian 7359 #endif 7360 7361 ; 7362 return 0; 7363 } 7364 _ACEOF 7365 rm -f conftest.$ac_objext 7366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7367 (eval $ac_compile) 2>conftest.er1 7368 ac_status=$? 7369 grep -v '^ *+' conftest.er1 >conftest.err 7370 rm -f conftest.er1 7371 cat conftest.err >&5 7372 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7373 (exit $ac_status); } && 7374 { ac_try='test -z "$ac_c_werror_flag" 7375 || test ! -s conftest.err' 7376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7377 (eval $ac_try) 2>&5 7378 ac_status=$? 7379 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7380 (exit $ac_status); }; } && 7381 { ac_try='test -s conftest.$ac_objext' 7382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7383 (eval $ac_try) 2>&5 7384 ac_status=$? 7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7386 (exit $ac_status); }; }; then 7387 ac_cv_c_bigendian=yes 7388 else 7389 echo "$as_me: failed program was:" >&5 7390 sed 's/^/| /' conftest.$ac_ext >&5 7391 7392 ac_cv_c_bigendian=no 7393 fi 7394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7395 else 7396 echo "$as_me: failed program was:" >&5 7397 sed 's/^/| /' conftest.$ac_ext >&5 7398 7399 # It does not; compile a test program. 7400 if test "$cross_compiling" = yes; then 7401 # try to guess the endianness by grepping values into an object file 7402 ac_cv_c_bigendian=unknown 7403 cat >conftest.$ac_ext <<_ACEOF 7404 /* confdefs.h. */ 7405 _ACEOF 7406 cat confdefs.h >>conftest.$ac_ext 7407 cat >>conftest.$ac_ext <<_ACEOF 7408 /* end confdefs.h. */ 7409 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 7410 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 7411 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } 7412 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 7413 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 7414 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } 7415 int 7416 main () 7417 { 7418 _ascii (); _ebcdic (); 7419 ; 7420 return 0; 7421 } 7422 _ACEOF 7423 rm -f conftest.$ac_objext 7424 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7425 (eval $ac_compile) 2>conftest.er1 7426 ac_status=$? 7427 grep -v '^ *+' conftest.er1 >conftest.err 7428 rm -f conftest.er1 7429 cat conftest.err >&5 7430 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7431 (exit $ac_status); } && 7432 { ac_try='test -z "$ac_c_werror_flag" 7433 || test ! -s conftest.err' 7434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7435 (eval $ac_try) 2>&5 7436 ac_status=$? 7437 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7438 (exit $ac_status); }; } && 7439 { ac_try='test -s conftest.$ac_objext' 7440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7441 (eval $ac_try) 2>&5 7442 ac_status=$? 7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7444 (exit $ac_status); }; }; then 7445 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then 7446 ac_cv_c_bigendian=yes 7447 fi 7448 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 7449 if test "$ac_cv_c_bigendian" = unknown; then 7450 ac_cv_c_bigendian=no 7451 else 7452 # finding both strings is unlikely to happen, but who knows? 7453 ac_cv_c_bigendian=unknown 7454 fi 7455 fi 7456 else 7457 echo "$as_me: failed program was:" >&5 7458 sed 's/^/| /' conftest.$ac_ext >&5 7459 7460 fi 7461 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7462 else 7463 cat >conftest.$ac_ext <<_ACEOF 7464 /* confdefs.h. */ 7465 _ACEOF 7466 cat confdefs.h >>conftest.$ac_ext 7467 cat >>conftest.$ac_ext <<_ACEOF 7468 /* end confdefs.h. */ 7469 int 7470 main () 7471 { 7472 /* Are we little or big endian? From Harbison&Steele. */ 7473 union 7474 { 7475 long l; 7476 char c[sizeof (long)]; 7477 } u; 7478 u.l = 1; 7479 exit (u.c[sizeof (long) - 1] == 1); 7480 } 7481 _ACEOF 7482 rm -f conftest$ac_exeext 7483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7484 (eval $ac_link) 2>&5 7485 ac_status=$? 7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7489 (eval $ac_try) 2>&5 7490 ac_status=$? 7491 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7492 (exit $ac_status); }; }; then 7493 ac_cv_c_bigendian=no 7494 else 7495 echo "$as_me: program exited with status $ac_status" >&5 7496 echo "$as_me: failed program was:" >&5 7497 sed 's/^/| /' conftest.$ac_ext >&5 7498 7499 ( exit $ac_status ) 7500 ac_cv_c_bigendian=yes 7501 fi 7502 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7503 fi 7504 fi 7505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7506 fi 7507 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 7508 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 7509 case $ac_cv_c_bigendian in 7510 yes) 7511 7512 cat >>confdefs.h <<\_ACEOF 7513 #define WORDS_BIGENDIAN 1 7514 _ACEOF 7515 ;; 7516 no) 7517 ;; 7518 *) 7519 { { echo "$as_me:$LINENO: error: unknown endianness 7520 presetting ac_cv_c_bigendian=no (or yes) will help" >&5 7521 echo "$as_me: error: unknown endianness 7522 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} 7523 { (exit 1); exit 1; }; } ;; 7524 esac 7525 7526 7274 7527 # --------------------------------------------------------------------------- 7275 7528 if test "$ac_cv_func_alloca" = 'no'; then … … 7303 7556 7304 7557 fi; 7558 7305 7559 7306 7560 # --------------------------------------------------------------------------- … … 7958 8212 s,@JNISUFFIX@,$JNISUFFIX,;t t 7959 8213 s,@JNIFLAGS@,$JNIFLAGS,;t t 7960 s,@LIBOBJS@,$LIBOBJS,;t t7961 8214 s,@LTLIBOBJS@,$LTLIBOBJS,;t t 7962 8215 CEOF -
trunk/mgpp/configure.in
r10192 r10848 117 117 fp_WITH_GNU_READLINE 118 118 119 # text for endianness 120 AC_C_BIGENDIAN 121 119 122 # --------------------------------------------------------------------------- 120 123 if test "$ac_cv_func_alloca" = 'no'; then … … 132 135 AC_DEFINE(DISABLE_LONG_LONG)) 133 136 137 134 138 # --------------------------------------------------------------------------- 135 139 -
trunk/mgpp/lib/netorder.h
r3365 r10848 11 11 #endif 12 12 13 #if defined (_BIG_ENDIAN) || (defined (BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN) || (defined (__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) 14 # ifndef _BIG_ENDIAN 15 # define _BIG_ENDIAN 16 # endif 17 #endif 18 19 #if defined (_LITTLE_ENDIAN) || (defined (BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN) || (defined (__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) 20 # ifndef _LITTLE_ENDIAN 21 # define _LITTLE_ENDIAN 22 # endif 23 #endif 24 25 #ifdef _LITTLE_ENDIAN 13 #ifndef WORDS_BIGENDIAN 26 14 27 15 /* double */ … … 133 121 #define NTOHUS2(ns, hs) ((hs) = ntohs((ns))) 134 122 135 #else /* _BIG_ENDIAN */123 #else /* WORDS_BIGENDIAN */ 136 124 137 125 /* double */
Note:
See TracChangeset
for help on using the changeset viewer.