typedef int ssize_t;
#endif
-/* FIXME - need proper configure tests for these */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt12_t long double
-#define _ast_fltmax_t _ast_flt12_t
-/* */
-
#ifndef va_listref
#define va_listref(p) (p) /* pass va_list to varargs function */
#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
#endif
}end
-tst - -DN=0 - -DN=1 - -DN=2 - -DN=3 - -DN=4 - -DN=5 - -DN=6 - -DN=7 - -DN=8 output{
- #define _BYTESEX_H
-
- #if _STD_
- #include <stddef.h>
- #else
- #include <sys/types.h>
- #endif
-
- _BEGIN_EXTERNS_
- extern int printf(const char*, ...);
- _END_EXTERNS_
-
- #if N == 0
- #define _ast_int8_t long
- #define _ast_int8_str "long"
- #endif
- #if N == 1
- #define _ast_int8_t long long
- #define _ast_int8_str "long long"
- #endif
- #if N == 2
- #define _ast_int8_t __int64_t
- #define _ast_int8_str "__int64_t"
- #endif
- #if N == 3
- #define _ast_int8_t _int64_t
- #define _ast_int8_str "_int64_t"
- #endif
- #if N == 4
- #define _ast_int8_t int64_t
- #define _ast_int8_str "int64_t"
- #endif
- #if N == 5
- #define _ast_int8_t __int64
- #define _ast_int8_str "__int64"
- #endif
- #if N == 6
- #define _ast_int8_t _int64
- #define _ast_int8_str "_int64"
- #endif
- #if N == 7
- #define _ast_int8_t int64
- #define _ast_int8_str "int64"
- #endif
-
- #define elementsof(x) (sizeof(x)/sizeof(x[0]))
-
- static char i_char = 1;
- static short i_short = 1;
- static int i_int = 1;
- static long i_long = 1;
- #ifdef _ast_int8_t
- static _ast_int8_t i_long_long = 1;
- #endif
-
- static struct
- {
- char* name;
- int size;
- char* swap;
- } int_type[] =
- {
- "char", sizeof(char), (char*)&i_char,
- "short", sizeof(short), (char*)&i_short,
- "int", sizeof(int), (char*)&i_int,
- "long", sizeof(long), (char*)&i_long,
- #ifdef _ast_int8_t
- _ast_int8_str, sizeof(_ast_int8_t), (char*)&i_long_long,
- #endif
- };
-
- static struct
- {
- char* name;
- int size;
- } flt_type[] =
- {
- "float", sizeof(float),
- "double", sizeof(double),
- #ifdef _typ_long_double
- "long double", sizeof(long double),
- #endif
- };
-
- static int int_size[] = { 1, 2, 4, 8 };
-
- main()
- {
- register int t;
- register int s;
- register int m = 1;
- register int b = 1;
- register int w = 0;
-
- #ifdef _ast_int8_t
- if (int_type[elementsof(int_type)-1].size <= 4)
- return 1;
- #endif
- for (s = 0; s < elementsof(int_size); s++)
- {
- for (t = 0; t < elementsof(int_type); t++)
- if(int_type[t].size >= int_size[s])
- break;
- if (t < elementsof(int_type))
- {
- m = int_size[s];
- printf("#define _ast_int%d_t\t\t%s\n",
- m, int_type[t].name);
- if (m > 1)
- {
- if (*int_type[t].swap)
- w |= b;
- b <<= 1;
- }
- }
- }
- printf("#define _ast_intmax_t _ast_int%d_t\n", m);
- if (m == sizeof(long))
- printf("#define _ast_intmax_long 1\n");
- printf("#define _ast_intswap %d\n", w);
- printf("\n");
- for (t = 0; t < elementsof(flt_type); t++)
- {
- for(; t < elementsof(flt_type); t++)
- if(flt_type[t].size != flt_type[t + 1].size)
- break;
- m = flt_type[t].size;
- printf("#define _ast_flt%d_t\t\t%s\n",
- flt_type[t].size, flt_type[t].name);
- }
- printf("#define _ast_fltmax_t _ast_flt%d_t\n", m);
- if (m == sizeof(double))
- printf("#define _ast_fltmax_double 1\n");
- return 0;
- }
-}end
-
tst - -DTRY=1 - -DTRY=1 -Dvoid=char - -DTRY=2 - -DTRY=3 - -DTRY=4 output{
#define printf ______printf
#ifdef __STDC__
#endif
}end
-tst - -DN=0 - -DN=1 - -DN=2 - -DN=3 - -DN=4 - -DN=5 - -DN=6 - -DN=7 - -DN=8 output{
- #define _BYTESEX_H
-
- #if _STD_
- #include <stddef.h>
- #else
- #include <sys/types.h>
- #endif
-
- _BEGIN_EXTERNS_
- extern int printf(const char*, ...);
- _END_EXTERNS_
-
- #if N == 0
- #define _ast_int8_t long
- #define _ast_int8_str "long"
- #endif
- #if N == 1
- #define _ast_int8_t long long
- #define _ast_int8_str "long long"
- #endif
- #if N == 2
- #define _ast_int8_t __int64_t
- #define _ast_int8_str "__int64_t"
- #endif
- #if N == 3
- #define _ast_int8_t _int64_t
- #define _ast_int8_str "_int64_t"
- #endif
- #if N == 4
- #define _ast_int8_t int64_t
- #define _ast_int8_str "int64_t"
- #endif
- #if N == 5
- #define _ast_int8_t __int64
- #define _ast_int8_str "__int64"
- #endif
- #if N == 6
- #define _ast_int8_t _int64
- #define _ast_int8_str "_int64"
- #endif
- #if N == 7
- #define _ast_int8_t int64
- #define _ast_int8_str "int64"
- #endif
-
- #define elementsof(x) (sizeof(x)/sizeof(x[0]))
-
- static char i_char = 1;
- static short i_short = 1;
- static int i_int = 1;
- static long i_long = 1;
- #ifdef _ast_int8_t
- static _ast_int8_t i_long_long = 1;
- #endif
-
- static struct
- {
- char* name;
- int size;
- char* swap;
- } int_type[] =
- {
- "char", sizeof(char), (char*)&i_char,
- "short", sizeof(short), (char*)&i_short,
- "int", sizeof(int), (char*)&i_int,
- "long", sizeof(long), (char*)&i_long,
- #ifdef _ast_int8_t
- _ast_int8_str, sizeof(_ast_int8_t), (char*)&i_long_long,
- #endif
- };
-
- static struct
- {
- char* name;
- int size;
- } flt_type[] =
- {
- "float", sizeof(float),
- "double", sizeof(double),
- #ifdef _typ_long_double
- "long double", sizeof(long double),
- #endif
- };
-
- static int int_size[] = { 1, 2, 4, 8 };
-
- main()
- {
- register int t;
- register int s;
- register int m = 1;
- register int b = 1;
- register int w = 0;
-
- #ifdef _ast_int8_t
- if (int_type[elementsof(int_type)-1].size <= 4)
- return 1;
- #endif
- for (s = 0; s < elementsof(int_size); s++)
- {
- for (t = 0; t < elementsof(int_type); t++)
- if(int_type[t].size >= int_size[s])
- break;
- if (t < elementsof(int_type))
- {
- m = int_size[s];
- printf("#define _ast_int%d_t\t\t%s\n",
- m, int_type[t].name);
- if (m > 1)
- {
- if (*int_type[t].swap)
- w |= b;
- b <<= 1;
- }
- }
- }
- printf("#define _ast_intmax_t _ast_int%d_t\n", m);
- if (m == sizeof(long))
- printf("#define _ast_intmax_long 1\n");
- printf("#define _ast_intswap %d\n", w);
- printf("\n");
- for (t = 0; t < elementsof(flt_type); t++)
- {
- for(; t < elementsof(flt_type); t++)
- if(flt_type[t].size != flt_type[t + 1].size)
- break;
- m = flt_type[t].size;
- printf("#define _ast_flt%d_t\t\t%s\n",
- flt_type[t].size, flt_type[t].name);
- }
- printf("#define _ast_fltmax_t _ast_flt%d_t\n", m);
- if (m == sizeof(double))
- printf("#define _ast_fltmax_double 1\n");
- return 0;
- }
-}end
-
tst - -DTRY=1 - -DTRY=1 -Dvoid=char - -DTRY=2 - -DTRY=3 - -DTRY=4 output{
#define printf ______printf
#ifdef __STDC__
/* Sfoff_t should be large enough for largest file address */
-#define Sfoff_t _ast_intmax_t
-#define Sflong_t _ast_intmax_t
-#define Sfulong_t unsigned _ast_intmax_t
-#define Sfdouble_t _ast_fltmax_t
+#define Sfoff_t long long
+#define Sflong_t long long
+#define Sfulong_t unsigned long long
+#define Sfdouble_t long double
typedef struct _sfio_s Sfio_t;
#endif
}end
-tst - -DN=0 - -DN=1 - -DN=2 - -DN=3 - -DN=4 - -DN=5 - -DN=6 - -DN=7 - -DN=8 output{
- #define _BYTESEX_H
-
- #if _STD_
- #include <stddef.h>
- #else
- #include <sys/types.h>
- #endif
-
- _BEGIN_EXTERNS_
- extern int printf(const char*, ...);
- _END_EXTERNS_
-
- #if N == 0
- #define _ast_int8_t long
- #define _ast_int8_str "long"
- #endif
- #if N == 1
- #define _ast_int8_t long long
- #define _ast_int8_str "long long"
- #endif
- #if N == 2
- #define _ast_int8_t __int64_t
- #define _ast_int8_str "__int64_t"
- #endif
- #if N == 3
- #define _ast_int8_t _int64_t
- #define _ast_int8_str "_int64_t"
- #endif
- #if N == 4
- #define _ast_int8_t int64_t
- #define _ast_int8_str "int64_t"
- #endif
- #if N == 5
- #define _ast_int8_t __int64
- #define _ast_int8_str "__int64"
- #endif
- #if N == 6
- #define _ast_int8_t _int64
- #define _ast_int8_str "_int64"
- #endif
- #if N == 7
- #define _ast_int8_t int64
- #define _ast_int8_str "int64"
- #endif
-
- #define elementsof(x) (sizeof(x)/sizeof(x[0]))
-
- static char i_char = 1;
- static short i_short = 1;
- static int i_int = 1;
- static long i_long = 1;
- #ifdef _ast_int8_t
- static _ast_int8_t i_long_long = 1;
- #endif
-
- static struct
- {
- char* name;
- int size;
- char* swap;
- } int_type[] =
- {
- "char", sizeof(char), (char*)&i_char,
- "short", sizeof(short), (char*)&i_short,
- "int", sizeof(int), (char*)&i_int,
- "long", sizeof(long), (char*)&i_long,
- #ifdef _ast_int8_t
- _ast_int8_str, sizeof(_ast_int8_t), (char*)&i_long_long,
- #endif
- };
-
- static struct
- {
- char* name;
- int size;
- } flt_type[] =
- {
- "float", sizeof(float),
- "double", sizeof(double),
- #ifdef _typ_long_double
- "long double", sizeof(long double),
- #endif
- };
-
- static int int_size[] = { 1, 2, 4, 8 };
-
- main()
- {
- register int t;
- register int s;
- register int m = 1;
- register int b = 1;
- register int w = 0;
-
- #ifdef _ast_int8_t
- if (int_type[elementsof(int_type)-1].size <= 4)
- return 1;
- #endif
- for (s = 0; s < elementsof(int_size); s++)
- {
- for (t = 0; t < elementsof(int_type); t++)
- if(int_type[t].size >= int_size[s])
- break;
- if (t < elementsof(int_type))
- {
- m = int_size[s];
- printf("#define _ast_int%d_t\t\t%s\n",
- m, int_type[t].name);
- if (m > 1)
- {
- if (*int_type[t].swap)
- w |= b;
- b <<= 1;
- }
- }
- }
- printf("#define _ast_intmax_t _ast_int%d_t\n", m);
- if (m == sizeof(long))
- printf("#define _ast_intmax_long 1\n");
- printf("#define _ast_intswap %d\n", w);
- printf("\n");
- for (t = 0; t < elementsof(flt_type); t++)
- {
- for(; t < elementsof(flt_type); t++)
- if(flt_type[t].size != flt_type[t + 1].size)
- break;
- m = flt_type[t].size;
- printf("#define _ast_flt%d_t\t\t%s\n",
- flt_type[t].size, flt_type[t].name);
- }
- printf("#define _ast_fltmax_t _ast_flt%d_t\n", m);
- if (m == sizeof(double))
- printf("#define _ast_fltmax_double 1\n");
- return 0;
- }
-}end
-
tst - -DTRY=1 - -DTRY=1 -Dvoid=char - -DTRY=2 - -DTRY=3 - -DTRY=4 output{
#define printf ______printf
#ifdef __STDC__
# define _typ_ssize_t 1
typedef int ssize_t;
#endif
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt12_t long double
-#define _ast_fltmax_t _ast_flt12_t
#ifndef va_listref
#define va_listref(p) (p) /* pass va_list to varargs function */