diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-12 08:59:05 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-12 08:59:05 +0000 |
commit | 7b6cb5bd2ce5a30c6074488312de984b1c69674a (patch) | |
tree | cb0ecd2cd7b8c21d4d1c38261b5b7116e8dd2782 /libgfortran/intrinsics/stat.c | |
parent | 2027d2d27693ee46db98fb7d407b8856d64fb864 (diff) | |
download | gcc-7b6cb5bd2ce5a30c6074488312de984b1c69674a.tar.gz |
* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
(LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
(LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
* configure.ac: Use them.
* configure, config.h.in, aclocal.m4: Rebuild.
* libgfortran.h (prefix): Remove.
(PREFIX, IPREFIX): New.
(sym_rename, sym_rename1, sym_rename2): New.
(internal_proto, export_proto, export_proto_np): New.
(iexport_proto, iexport): New.
(iexport_data_proto, iexport_data): New.
* intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
intrinsics/cpu_time.c, intrinsics/cshift0.c,
intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
intrinsics/reshape_generic.c, intrinsics/size.c,
intrinsics/spread_generic.c, intrinsics/stat.c,
intrinsics/string_intrinsics.c, intrinsics/system.c,
intrinsics/system_clock.c, intrinsics/transpose_generic.c,
intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
m4/transpose.m4, runtime/environ.c, runtime/error.c,
runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
runtime/stop.c: Use them to mark symbols internal or external.
* generated/*: Rebuild.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics/stat.c')
-rw-r--r-- | libgfortran/intrinsics/stat.c | 75 |
1 files changed, 48 insertions, 27 deletions
diff --git a/libgfortran/intrinsics/stat.c b/libgfortran/intrinsics/stat.c index 8f250d460f0..de4a14736fa 100644 --- a/libgfortran/intrinsics/stat.c +++ b/libgfortran/intrinsics/stat.c @@ -52,9 +52,13 @@ Boston, MA 02111-1307, USA. */ CHARACTER(len=*), INTENT(IN) :: FILE INTEGER, INTENT(OUT), :: SARRAY(13) */ +extern void stat_i4_sub (char *, gfc_array_i4 *, GFC_INTEGER_4 *, + gfc_charlen_type); +iexport_proto(stat_i4_sub); + void -prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray, - GFC_INTEGER_4 * status, gfc_charlen_type name_len) +stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status, + gfc_charlen_type name_len) { int val; char *str; @@ -68,10 +72,10 @@ prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray, /* If the array is too small, abort. */ if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) - runtime_error ("Array size of SARRAY is too small."); + runtime_error ("Array size of SARRAY is too small."); if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; + sarray->dim[0].stride = 1; /* Trim trailing spaces from name. */ while (name_len > 0 && name[name_len - 1] == ' ') @@ -141,10 +145,15 @@ prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray, if (status != NULL) *status = (val == 0) ? 0 : errno; } +iexport(stat_i4_sub); + +extern void stat_i8_sub (char *, gfc_array_i8 *, GFC_INTEGER_8 *, + gfc_charlen_type); +iexport_proto(stat_i8_sub); void -prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray, - GFC_INTEGER_8 * status, gfc_charlen_type name_len) +stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status, + gfc_charlen_type name_len) { int val; char *str; @@ -158,10 +167,10 @@ prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray, /* If the array is too small, abort. */ if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) - runtime_error ("Array size of SARRAY is too small."); + runtime_error ("Array size of SARRAY is too small."); if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; + sarray->dim[0].stride = 1; /* Trim trailing spaces from name. */ while (name_len > 0 && name[name_len - 1] == ' ') @@ -231,25 +240,27 @@ prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray, if (status != NULL) *status = (val == 0) ? 0 : errno; } +iexport(stat_i8_sub); +extern GFC_INTEGER_4 stat_i4 (char *, gfc_array_i4 *, gfc_charlen_type); +export_proto(stat_i4); GFC_INTEGER_4 -prefix(stat_i4) (char * name, gfc_array_i4 * sarray, - gfc_charlen_type name_len) +stat_i4 (char *name, gfc_array_i4 *sarray, gfc_charlen_type name_len) { - GFC_INTEGER_4 val; - prefix(stat_i4_sub) (name, sarray, &val, name_len); + stat_i4_sub (name, sarray, &val, name_len); return val; } +extern GFC_INTEGER_8 stat_i8 (char *, gfc_array_i8 *, gfc_charlen_type); +export_proto(stat_i8); GFC_INTEGER_8 -prefix(stat_i8) (char * name, gfc_array_i8 * sarray, - gfc_charlen_type name_len) +stat_i8 (char *name, gfc_array_i8 *sarray, gfc_charlen_type name_len) { GFC_INTEGER_8 val; - prefix(stat_i8_sub) (name, sarray, &val, name_len); + stat_i8_sub (name, sarray, &val, name_len); return val; } @@ -264,9 +275,11 @@ prefix(stat_i8) (char * name, gfc_array_i8 * sarray, INTEGER, INTENT(IN) :: UNIT INTEGER, INTENT(OUT) :: SARRAY(13) */ +extern void fstat_i4_sub (GFC_INTEGER_4 *, gfc_array_i4 *, GFC_INTEGER_4 *); +iexport_proto(fstat_i4_sub); + void -prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray, - GFC_INTEGER_4 * status) +fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status) { int val; struct stat sb; @@ -279,10 +292,10 @@ prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray, /* If the array is too small, abort. */ if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) - runtime_error ("Array size of SARRAY is too small."); + runtime_error ("Array size of SARRAY is too small."); if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; + sarray->dim[0].stride = 1; /* Convert Fortran unit number to C file descriptor. */ val = unit_to_fd (*unit); @@ -346,10 +359,13 @@ prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray, if (status != NULL) *status = (val == 0) ? 0 : errno; } +iexport(fstat_i4_sub); + +extern void fstat_i8_sub (GFC_INTEGER_8 *, gfc_array_i8 *, GFC_INTEGER_8 *); +iexport_proto(fstat_i8_sub); void -prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray, - GFC_INTEGER_8 * status) +fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status) { int val; struct stat sb; @@ -362,10 +378,10 @@ prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray, /* If the array is too small, abort. */ if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13) - runtime_error ("Array size of SARRAY is too small."); + runtime_error ("Array size of SARRAY is too small."); if (sarray->dim[0].stride == 0) - sarray->dim[0].stride = 1; + sarray->dim[0].stride = 1; /* Convert Fortran unit number to C file descriptor. */ val = unit_to_fd ((int) *unit); @@ -429,21 +445,26 @@ prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray, if (status != NULL) *status = (val == 0) ? 0 : errno; } +iexport(fstat_i8_sub); +extern GFC_INTEGER_4 fstat_i4 (GFC_INTEGER_4 *, gfc_array_i4 *); +export_proto(fstat_i4); GFC_INTEGER_4 -prefix(fstat_i4) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray) +fstat_i4 (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray) { GFC_INTEGER_4 val; - prefix(fstat_i4_sub) (unit, sarray, &val); + fstat_i4_sub (unit, sarray, &val); return val; } +extern GFC_INTEGER_8 fstat_i8 (GFC_INTEGER_8 *, gfc_array_i8 *); +export_proto(fstat_i8); GFC_INTEGER_8 -prefix(fstat_i8) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray) +fstat_i8 (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray) { GFC_INTEGER_8 val; - prefix(fstat_i8_sub) (unit, sarray, &val); + fstat_i8_sub (unit, sarray, &val); return val; } |