OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / libgfortran / libgfortran.h
index ccafb7c..ccba2a7 100644 (file)
@@ -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];\
 }
@@ -292,7 +284,7 @@ enum
 
 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;
 
@@ -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 *,