]> www.ginac.de Git - cln.git/commitdiff
Remove some unused configuration macros.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 1 Feb 2021 18:48:10 +0000 (19:48 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 1 Feb 2021 19:23:03 +0000 (20:23 +0100)
* Don't test stack direction.
* Don't test endianness of chars.
* Assume HAVE_LONGLONG.

CMakeLists.txt
autoconf/intparam.c
include/cln/intparam.h.cmake
m4/intparam.m4

index d2c176f2bd269b46fc1c2e5fcf0b24881afcb654..3db992631e782016b96cbbe5e1955f401c488096 100644 (file)
@@ -91,13 +91,10 @@ if (GMP_FOUND)
 endif(GMP_FOUND)
 
 
-check_type_size("long long" LONGLONG)
-if (HAVE_LONGLONG)
-       set(SIZEOF_LONGLONG ${LONGLONG})
-endif()
 check_type_size("short" SIZEOF_SHORT)
 check_type_size("int" SIZEOF_INT)
 check_type_size("long" SIZEOF_LONG)
+check_type_size("long long" SIZEOF_LONGLONG)
 check_type_size("void *" SIZEOF_VOIDP)
 check_type_align("void *" ALIGNOF_VOIDP)
 
@@ -107,10 +104,8 @@ math(EXPR x "${SIZEOF_SHORT} * ${cl_char_bitsize}")
 set(cl_short_bitsize ${x} CACHE INTERNAL "short_bitsize")
 math(EXPR cl_int_bitsize "${SIZEOF_INT} * ${cl_char_bitsize}")
 math(EXPR cl_long_bitsize "${SIZEOF_LONG} * ${cl_char_bitsize}")
+math(EXPR cl_long_long_bitsize "${SIZEOF_LONGLONG} * ${cl_char_bitsize}")
 math(EXPR cl_pointer_bitsize "${SIZEOF_VOIDP} * ${cl_char_bitsize}")
-if (HAVE_LONGLONG)
-       math(EXPR cl_long_long_bitsize "${SIZEOF_LONGLONG} * ${cl_char_bitsize}")
-endif()
 
 
 check_include_file("unistd.h" HAVE_UNISTD_H)
index 66cce710eef1e24401c32574f13e6b6750e6a474..d086f8844714e9ca5ea0d1d02bc28c6c8c9f2fa3 100644 (file)
@@ -502,7 +502,6 @@ void main9(void) {
       else                                                                                       \
       { printf("#error \"Endianness makes no sense for type %s !!\"\n",typestr); }               \
   }
-  get_endian(uchar,"unsigned char",uchar_bitsize);
   get_endian(ushort,"unsigned short",ushort_bitsize);
   get_endian(uint,"unsigned int",uint_bitsize);
   get_endian(ulong,"unsigned long",ulong_bitsize);
@@ -510,34 +509,6 @@ void main9(void) {
   printf("\n");
 }
 
-long get_stack_direction(void)
-  { char dummy;
-    static char* dummyaddr = (char*)0;
-    if (!(dummyaddr == (char*)0))
-      { return (&dummy) - dummyaddr; }
-    else
-      { dummyaddr = &dummy;
-        { long result = get_stack_direction();
-          /* The next assignment avoids tail recursion elimination (IRIX 6.4 CC). */
-          dummyaddr = (char*)0;
-          return result;
-      } }
-  }
-
-void main10(void)
-  { long stack_direction = get_stack_direction();
-    if (stack_direction > 0)
-      { printf("/* Stack grows up, ca. %ld bytes per function call. */\n",(long)stack_direction);
-        printf("#define stack_grows_up\n");
-      }
-    else if (stack_direction < 0)
-      { printf("/* Stack grows down, ca. %ld bytes per function call. */\n",-(long)stack_direction);
-        printf("#define stack_grows_down\n");
-      }
-    else
-      printf("#error \"Unknown stack model -- incorrect C semantics!!\"\n");
-  }
-
 int main(int argc, char *argv[])
 { if (freopen(argc==1 ? "conftest.h" : argv[1], "w", stdout) == NULL) return 1;
   main1();
@@ -549,7 +520,6 @@ int main(int argc, char *argv[])
   main7();
   main8();
   main9();
-  main10();
   if (ferror(stdout) || fclose(stdout)) return 1;
   return 0;
 }
index cea812b6af1480fefb426d7f6508c856544e5415..262e52e47ba9d6271d7270bea5ab96134b260cf2 100644 (file)
@@ -2,11 +2,8 @@
 #define short_bitsize @cl_short_bitsize@
 #define int_bitsize @cl_int_bitsize@
 #define long_bitsize @cl_long_bitsize@
-// #ifdef HAVE_LONGLONG
 #define long_long_bitsize @cl_long_long_bitsize@
-// #endif
 #define pointer_bitsize @cl_pointer_bitsize@ 
-#define stack_grows_down
 #cmakedefine short_little_endian
 #cmakedefine int_little_endian
 #cmakedefine long_little_endian
index 2619013a8553cf9e380ebd88f43b2699d35e3277..5d7d00f303ca5484730a003a25c789bbcec58269 100644 (file)
@@ -222,17 +222,6 @@ AC_DEFUN([CL_INTPARAM_CROSS],
         echo "#error \"Type long long is stored in memory in an obscure manner!!\""
         ;;
     esac
-    echo
-    case $host_cpu in
-      hppa)
-        echo "/* Stack grows up. */"
-        echo "#define stack_grows_up"
-        ;;
-      *)
-        echo "/* Stack grows down. */"
-        echo "#define stack_grows_down"
-        ;;
-    esac
   } > "$cl_machine_file_h"
 ])