|
@ -1,11 +1,11 @@ |
|
|
#line 1 "intparam.d" |
|
|
#line 1 "intparam.d" |
|
|
/* Bestimmung einiger Maschinen-Parameter und -Abhängigkeiten */ |
|
|
|
|
|
|
|
|
/* Bestimmung einiger Maschinen-Parameter und -Abh�gigkeiten */ |
|
|
/* und Ausgabe in ein Include-File */ |
|
|
/* und Ausgabe in ein Include-File */ |
|
|
/* Bruno Haible 10.9.1991, 12.10.1992, 6.12.1992, 24.10.1993 */ |
|
|
/* Bruno Haible 10.9.1991, 12.10.1992, 6.12.1992, 24.10.1993 */ |
|
|
|
|
|
|
|
|
/* Auf einigen Systemen werden in <sys/types.h> die Typen uchar, ushort, uint, */ |
|
|
/* Auf einigen Systemen werden in <sys/types.h> die Typen uchar, ushort, uint, */ |
|
|
/* ulong definiert. Normalerweise reicht _POSIX_SOURCE aus, dies zu verhindern, */ |
|
|
/* ulong definiert. Normalerweise reicht _POSIX_SOURCE aus, dies zu verhindern, */ |
|
|
/* bei AIX 3.2.5 (rs6000-ibm-aix3.2.5) jedoch nicht. Wir müssen Gewalt anwenden. */ |
|
|
|
|
|
|
|
|
/* bei AIX 3.2.5 (rs6000-ibm-aix3.2.5) jedoch nicht. Wir mssen Gewalt anwenden. */ |
|
|
#define _POSIX_SOURCE |
|
|
#define _POSIX_SOURCE |
|
|
#define uchar os_uchar |
|
|
#define uchar os_uchar |
|
|
#define ushort os_ushort |
|
|
#define ushort os_ushort |
|
@ -43,7 +43,7 @@ typedef unsigned long long ulonglong; |
|
|
#endif |
|
|
#endif |
|
|
typedef int (function)(); |
|
|
typedef int (function)(); |
|
|
|
|
|
|
|
|
static int random_table[256] = /* 2048 zufällige Bits, hier von pi */ |
|
|
|
|
|
|
|
|
static int random_table[256] = /* 2048 zuf�lige Bits, hier von pi */ |
|
|
{ 0xC9,0x0F,0xDA,0xA2,0x21,0x68,0xC2,0x34,0xC4,0xC6,0x62,0x8B, |
|
|
{ 0xC9,0x0F,0xDA,0xA2,0x21,0x68,0xC2,0x34,0xC4,0xC6,0x62,0x8B, |
|
|
0x80,0xDC,0x1C,0xD1,0x29,0x02,0x4E,0x08,0x8A,0x67,0xCC,0x74, |
|
|
0x80,0xDC,0x1C,0xD1,0x29,0x02,0x4E,0x08,0x8A,0x67,0xCC,0x74, |
|
|
0x02,0x0B,0xBE,0xA6,0x3B,0x13,0x9B,0x22,0x51,0x4A,0x08,0x79, |
|
|
0x02,0x0B,0xBE,0xA6,0x3B,0x13,0x9B,0x22,0x51,0x4A,0x08,0x79, |
|
@ -347,7 +347,7 @@ void main5(void) { |
|
|
if (!sign_extends && !zero_extends) \ |
|
|
if (!sign_extends && !zero_extends) \ |
|
|
printf("#error \"Casts from %s to %s works in an unknown manner!!\"\n",typestr1,typestr2); \ |
|
|
printf("#error \"Casts from %s to %s works in an unknown manner!!\"\n",typestr1,typestr2); \ |
|
|
} |
|
|
} |
|
|
/* erst Casts zwischen Integers vermutlich gleicher Größe: */ |
|
|
|
|
|
|
|
|
/* erst Casts zwischen Integers vermutlich gleicher Gr�e: */ |
|
|
test_integer_casts(schar,uchar,"char","unsigned char",char_bitsize,uchar_bitsize,0); |
|
|
test_integer_casts(schar,uchar,"char","unsigned char",char_bitsize,uchar_bitsize,0); |
|
|
test_integer_casts(short,ushort,"short","unsigned short",short_bitsize,ushort_bitsize,0); |
|
|
test_integer_casts(short,ushort,"short","unsigned short",short_bitsize,ushort_bitsize,0); |
|
|
test_integer_casts(int,uint,"int","unsigned int",int_bitsize,uint_bitsize,0); |
|
|
test_integer_casts(int,uint,"int","unsigned int",int_bitsize,uint_bitsize,0); |
|
@ -360,7 +360,7 @@ void main5(void) { |
|
|
test_integer_casts(longlong,ulonglong,"long long","unsigned long long",longlong_bitsize,ulonglong_bitsize,0); |
|
|
test_integer_casts(longlong,ulonglong,"long long","unsigned long long",longlong_bitsize,ulonglong_bitsize,0); |
|
|
test_integer_casts(ulonglong,longlong,"unsigned long long","long long",ulonglong_bitsize,longlong_bitsize,0); |
|
|
test_integer_casts(ulonglong,longlong,"unsigned long long","long long",ulonglong_bitsize,longlong_bitsize,0); |
|
|
#endif |
|
|
#endif |
|
|
/* dann Casts zwischen Integers unterschiedlicher Größe, aber gleichen Vorzeichens: */ |
|
|
|
|
|
|
|
|
/* dann Casts zwischen Integers unterschiedlicher Gr�e, aber gleichen Vorzeichens: */ |
|
|
test_integer_casts(uchar,ushort,"unsigned char","unsigned short",uchar_bitsize,ushort_bitsize,1); |
|
|
test_integer_casts(uchar,ushort,"unsigned char","unsigned short",uchar_bitsize,ushort_bitsize,1); |
|
|
test_integer_casts(uchar,uint,"unsigned char","unsigned int",uchar_bitsize,uint_bitsize,1); |
|
|
test_integer_casts(uchar,uint,"unsigned char","unsigned int",uchar_bitsize,uint_bitsize,1); |
|
|
test_integer_casts(uchar,ulong,"unsigned char","unsigned long",uchar_bitsize,ulong_bitsize,1); |
|
|
test_integer_casts(uchar,ulong,"unsigned char","unsigned long",uchar_bitsize,ulong_bitsize,1); |
|
@ -385,7 +385,7 @@ void main5(void) { |
|
|
test_integer_casts(int,longlong,"int","long long",int_bitsize,longlong_bitsize,2); |
|
|
test_integer_casts(int,longlong,"int","long long",int_bitsize,longlong_bitsize,2); |
|
|
test_integer_casts(long,longlong,"long","long long",long_bitsize,longlong_bitsize,2); |
|
|
test_integer_casts(long,longlong,"long","long long",long_bitsize,longlong_bitsize,2); |
|
|
#endif |
|
|
#endif |
|
|
/* dann Casts zwischen Integers unterschiedlicher Größe und unterschiedlichen Vorzeichens: */ |
|
|
|
|
|
|
|
|
/* dann Casts zwischen Integers unterschiedlicher Gr�e und unterschiedlichen Vorzeichens: */ |
|
|
test_integer_casts(uchar,short,"unsigned char","short",uchar_bitsize,short_bitsize,1); |
|
|
test_integer_casts(uchar,short,"unsigned char","short",uchar_bitsize,short_bitsize,1); |
|
|
test_integer_casts(uchar,int,"unsigned char","int",uchar_bitsize,int_bitsize,1); |
|
|
test_integer_casts(uchar,int,"unsigned char","int",uchar_bitsize,int_bitsize,1); |
|
|
test_integer_casts(uchar,long,"unsigned char","long",uchar_bitsize,long_bitsize,1); |
|
|
test_integer_casts(uchar,long,"unsigned char","long",uchar_bitsize,long_bitsize,1); |
|
@ -578,11 +578,6 @@ int main() |
|
|
main8(); |
|
|
main8(); |
|
|
main9(); |
|
|
main9(); |
|
|
main10(); |
|
|
main10(); |
|
|
#if defined(__cplusplus) |
|
|
|
|
|
if (ferror(stdout)) return 1; |
|
|
if (ferror(stdout)) return 1; |
|
|
return 0; |
|
|
return 0; |
|
|
#else |
|
|
|
|
|
if (ferror(stdout)) { exit(1); } |
|
|
|
|
|
exit(0); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
} |