X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libgfortran%2Flibgfortran.h;h=ccba2a764bee1a1d0eb7abeb77e4f65628344f43;hb=7e3cc6817ae6be36340eb0c1978c1b3210cab69e;hp=dfa2e409f4b69b338aea3be95cc3036898f2e8f5;hpb=ff81ee3b6e43e270bebd2400f3521f2d6da8cc59;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index dfa2e409f4b..ccba2a764be 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -171,9 +171,14 @@ typedef off_t gfc_offset; /* The isfinite macro is only available with C99, but some non-C99 systems still provide fpclassify, and there is a `finite' function - in BSD. When isfinite is not available, try to use one of the + in BSD. + + Also, isfinite is broken on Cygwin. + + When isfinite is not available, try to use one of the alternatives, or bail out. */ -#if !defined(isfinite) +#if (!defined(isfinite) || defined(__CYGWIN__)) +#undef isfinite static inline int isfinite (double x) { @@ -192,25 +197,12 @@ isfinite (double x) #define IMAGPART(z) (__imag__(z)) #define COMPLEX_ASSIGN(z_, r_, i_) {__real__(z_) = (r_); __imag__(z_) = (i_);} -typedef int8_t GFC_INTEGER_1; -typedef int16_t GFC_INTEGER_2; -typedef int32_t GFC_INTEGER_4; -typedef int64_t GFC_INTEGER_8; -typedef uint8_t GFC_UINTEGER_1; -typedef uint16_t GFC_UINTEGER_2; -typedef uint32_t GFC_UINTEGER_4; -typedef uint64_t GFC_UINTEGER_8; -typedef GFC_INTEGER_4 GFC_LOGICAL_4; -typedef GFC_INTEGER_8 GFC_LOGICAL_8; -typedef float GFC_REAL_4; -typedef double GFC_REAL_8; -typedef complex float GFC_COMPLEX_4; -typedef complex double GFC_COMPLEX_8; +#include "kinds.h" /* The following two definitions must be consistent with the types used by the compiler. */ /* The type used of array indices, amongst other things. */ -typedef size_t index_type; +typedef ssize_t index_type; /* The type used for the lengths of character variables. */ typedef GFC_INTEGER_4 gfc_charlen_type; @@ -243,7 +235,7 @@ descriptor_dimension; #define GFC_ARRAY_DESCRIPTOR(r, type) \ struct {\ type *data;\ - type *base;\ + size_t offset;\ index_type dtype;\ descriptor_dimension dim[r];\ } @@ -379,10 +371,10 @@ internal_proto(get_args); /* error.c */ -extern char *gfc_itoa (int64_t); +extern char *gfc_itoa (GFC_INTEGER_LARGEST); internal_proto(gfc_itoa); -extern char *xtoa (uint64_t); +extern char *xtoa (GFC_UINTEGER_LARGEST); internal_proto(xtoa); extern void os_error (const char *) __attribute__ ((noreturn)); @@ -477,7 +469,7 @@ internal_proto(reshape_packed); /* Repacking functions. */ -/* ??? These four aren't currently used by the compiler, though we +/* ??? These eight aren't currently used by the compiler, though we certainly could do so. */ GFC_INTEGER_4 *internal_pack_4 (gfc_array_i4 *); internal_proto(internal_pack_4); @@ -485,12 +477,24 @@ internal_proto(internal_pack_4); GFC_INTEGER_8 *internal_pack_8 (gfc_array_i8 *); internal_proto(internal_pack_8); +GFC_COMPLEX_4 *internal_pack_c4 (gfc_array_c4 *); +internal_proto(internal_pack_c4); + +GFC_COMPLEX_8 *internal_pack_c8 (gfc_array_c8 *); +internal_proto(internal_pack_c8); + extern void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *); internal_proto(internal_unpack_4); extern void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *); internal_proto(internal_unpack_8); +extern void internal_unpack_c4 (gfc_array_c4 *, const GFC_COMPLEX_4 *); +internal_proto(internal_unpack_c4); + +extern void internal_unpack_c8 (gfc_array_c8 *, const GFC_COMPLEX_8 *); +internal_proto(internal_unpack_c8); + /* string_intrinsics.c */ extern GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,