/* 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)
{
/* 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;
typedef struct
{
- int stdin_unit, stdout_unit, optional_plus;
+ int stdin_unit, stdout_unit, stderr_unit, optional_plus;
int allocate_init_flag, allocate_init_value;
int locus;
/* 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);
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 *,