Warn about invoking non-Y2K-compliant intrinsics

From-SVN: r25609
This commit is contained in:
Craig Burley 1999-03-05 23:40:12 +00:00 committed by Craig Burley
parent 40ae436b58
commit 411d4e28f8
16 changed files with 278 additions and 21 deletions

View File

@ -1,3 +1,22 @@
Sat Mar 6 02:28:35 1999 Craig Burley <craig@jcb-sc.com>
Warn about non-Y2K-compliant intrinsics:
* bad.def (FFEBAD_INTRINSIC_Y2KBAD): New diagnostic.
* intrin.def (FFEINTRIN_impDATE, FFEINTRIN_impIDATE_vxt):
Use new DEFIMPY macro to flag these as non-Y2K-compliant.
* intdoc.c (DEFIMPY): Support new Y2K macro.
* intrin.h (DEFIMPY): Ditto.
* intrin.c (DEFIMPY): Ditto.
(ffeintrin_fulfill_generic, ffeintrin_fulfill_specific):
Warn about invocation of non-Y2K-compliant intrinsic.
* com-rt.def (FFECOM_gfrtDATE, FFECOM_gfrtVXTIDATE):
Rename external procedure names, to keep previously-
compiled (sans-new-warnings) code from linking to
new library.
* g77.texi: Document all this stuff.
* news.texi: Spread the joy.
* version.c: Bump version.
Fri Mar 5 13:22:44 1999 Craig Burley <craig@jcb-sc.com>
* news.texi: Relocate IDATE (VXT) fix: we put it in 1.1.2

View File

@ -700,6 +700,8 @@ FFEBAD_MSGS1 (FFEBAD_ARRAY_LARGE, FATAL,
"Array `%A' at %0 is too large to handle")
FFEBAD_MSGS1 (FFEBAD_SFUNC_UNUSED, WARN,
"Statement function `%A' defined at %0 is not used")
FFEBAD_MSGS1 (FFEBAD_INTRINSIC_Y2KBAD, WARN,
"Intrinsic `%A', invoked at %0, known to be non-Y2K-compliant [info -f g77 M Y2KBAD]")
#undef INFORM
#undef TRIVIAL

View File

@ -142,7 +142,7 @@ DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATE, "G77_date_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATE, "G77_date_y2kbug_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATE_AND_TIME, "G77_date_and_time_0", FFECOM_rttypeVOID_, "&a&a&a&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ0, "j0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ1, "j1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
@ -242,7 +242,7 @@ DEFGFRT (FFECOM_gfrtTIME, "G77_time_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtTTYNAM, "G77_ttynam_0", FFECOM_rttypeCHARACTER_, "&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUNLINK, "G77_unlink_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUMASK, "G77_umask_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_y2kbug_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtVXTTIME, "G77_vxttime_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE)

View File

@ -14,7 +14,7 @@
@c %**start of header
@setfilename g77.info
@set last-up-date 1999-03-03
@set last-up-date 1999-03-06
@set version-g77 0.5.24
@set email-general egcs@@egcs.cygnus.com
@set email-bugs egcs-bugs@@egcs.cygnus.com
@ -8145,6 +8145,119 @@ on at least some systems:
@ref{Date Intrinsic},
@ref{IDate Intrinsic (VXT)}.
@cindex y2kbuggy
@cindex date_y2kbuggy_0
@cindex vxtidate_y2kbuggy_0
@cindex G77_date_y2kbuggy_0
@cindex G77_vxtidate_y2kbuggy_0
The @code{libg2c} library
shipped with any @code{g77} that warns
about invocation of a non-Y2K-compliant intrinsic
has renamed the @samp{EXTERNAL} procedure names
of those intrinsics.
This is done so that
the @code{libg2c} implementations of these intrinsics
cannot be directly linked to
as @samp{EXTERNAL} names
(which normally would avoid the non-Y2K-intrinsic warning).
The renamed forms of the @samp{EXTERNAL} names
of these renamed procedures
may be linked to
by appending the string @samp{_y2kbug}
to the name of the procedure
in the source code.
For example:
@smallexample
CHARACTER*20 STR
INTEGER YY, MM, DD
EXTERNAL DATE_Y2KBUG, VXTIDATE_Y2KBUG
CALL DATE_Y2KBUG (STR)
CALL VXTIDATE_Y2KBUG (MM, DD, YY)
@end smallexample
(Note that the @samp{EXTERNAL} statement
is not actually required,
since the modified names are not recognized as intrinsics
by the current version of @code{g77}.
But it is shown in this specific case,
for purposes of illustration.)
The renaming of @samp{EXTERNAL} procedure names of these intrinsics
causes unresolved references at link time.
For example, @samp{EXTERNAL DATE; CALL DATE(STR)}
is normally compiled by @code{g77}
as, in C, @samp{date_(&str, 20);}.
This, in turn, links to the @samp{date_} procedure
in the @samp{libE77} portion of @code{libg2c},
which purposely calls a nonexistent procedure
named @samp{G77_date_y2kbuggy_0}.
The resulting link-time error is designed, via this name,
to encourage the programmer to look up the
index entries to this portion of the @code{g77} documentation.
Generally, we recommend that the @samp{EXTERNAL} method
of invoking procedures in @code{libg2c}
@emph{not} be used.
When used, some of the correctness checking
normally performed by @code{g77}
is skipped.
In particular, it is probably better to use the
@samp{INTRINSIC} method of invoking
non-Y2K-compliant procedures,
so anyone compiling the code
can quickly notice the potential Y2K problems
(via the warnings printing by @code{g77})
without having to even look at the code itself.
If there are problems linking @code{libg2c}
to code compiled by @code{g77}
that involve the string @samp{y2kbug},
and these are not explained above,
that probably indicates
that a version of @code{libg2c}
older than @code{g77}
is being linked to,
or that the new library is being linked
to code compiled by an older version of @code{g77}.
That's because, as of the version that warns about
non-Y2K-compliant intrinsic invocation,
@code{g77} references the @code{libg2c} implementations
of those intrinsics
using new names, containing the string @samp{y2kbug}.
So, linking newly-compiled code
(invoking one of the intrinsics in question)
to an old library
might yield an unresolved reference
to @samp{G77_date_y2kbug_0}.
(The old library calls it @samp{G77_date_0}.)
Similarly, linking previously-compiled code
to a new library
might yield an unresolved reference
to @samp{G77_vxtidate_0}.
(The new library calls it @samp{G77_vxtidate_y2kbug_0}.)
The proper fix for the above problems
is to obtain the latest release of @code{g77}
and related products
(including @code{libg2c})
and install them on all systems,
then recompile, relink, and install
(as appropriate)
all existing Fortran programs.
(Normally, this sort of renaming is steadfastly avoided.
In this case, however, it seems more important to highlight
potential Y2K problems
than to ease the transition
of potentially non-Y2K-compliant code
to new versions of @code{g77} and @code{libg2c}.)
@node Array Size
@subsection Array Size
@cindex limits, array size
@ -14756,6 +14869,7 @@ as the above is just a sample, no such section exists.
* LEX:: Various lexer messages
* GLOBALS:: Disagreements about globals.
* LINKFAIL:: When linking @samp{f771} fails.
* Y2KBAD:: Use of non-Y2K-compliant intrinsic.
@end menu
@node CMPAMBIG
@ -15327,6 +15441,24 @@ might solve this problem, e.g.@: by adding
BOOT_CFLAGS='-mminimal-toc -O2 -g'
@end smallexample
to the @code{make bootstrap} command line.
@node Y2KBAD
@section @code{Y2KBAD}
@cindex Y2K compliance
@cindex Year 2000 compliance
@noindent
@smallexample
Intrinsic `@var{name}', invoked at (^), known to be non-Y2K-compliant@dots{}
@end smallexample
This diagnostic indicates that
the specific intrinsic invoked by the name @var{name}
is known to have an interface
that is not Year-2000 (Y2K) compliant.
@xref{Year 2000 (Y2K) Problems}.
@end ifset
@node Index

View File

@ -124,11 +124,13 @@ static struct _ffeintrin_name_ names[] = {
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_gen_ gens[] = {
@ -137,11 +139,13 @@ static struct _ffeintrin_gen_ gens[] = {
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_imp_ imps[] = {
@ -151,9 +155,13 @@ static struct _ffeintrin_imp_ imps[] = {
#if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRT, CONTROL },
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
{ NAME, FFECOM_gfrt ## GFRT, CONTROL },
#elif 1 /* FFECOM_targetCURRENT == FFECOM_targetFFE */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, CONTROL },
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
{ NAME, CONTROL },
#else
#error
#endif
@ -162,6 +170,7 @@ static struct _ffeintrin_imp_ imps[] = {
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_spec_ specs[] = {
@ -170,10 +179,12 @@ static struct _ffeintrin_spec_ specs[] = {
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
struct cc_pair { ffeintrinImp imp; char *text; };

View File

@ -64,6 +64,7 @@ struct _ffeintrin_imp_
ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
char *control;
char y2kbad;
};
static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
@ -84,11 +85,13 @@ static struct _ffeintrin_name_ ffeintrin_names_[]
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_gen_ ffeintrin_gens_[]
@ -99,11 +102,13 @@ static struct _ffeintrin_gen_ ffeintrin_gens_[]
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_imp_ ffeintrin_imps_[]
@ -115,10 +120,15 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
FFECOM_gfrt ## GFRTGNU, CONTROL },
FFECOM_gfrt ## GFRTGNU, CONTROL, FALSE },
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
{ NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
FFECOM_gfrt ## GFRTGNU, CONTROL, Y2KBAD },
#elif FFECOM_targetCURRENT == FFECOM_targetFFE
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, CONTROL },
{ NAME, CONTROL, FALSE },
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
{ NAME, CONTROL, Y2KBAD },
#else
#error
#endif
@ -127,6 +137,7 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
static struct _ffeintrin_spec_ ffeintrin_specs_[]
@ -137,10 +148,12 @@ static struct _ffeintrin_spec_ ffeintrin_specs_[]
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
};
@ -1374,6 +1387,14 @@ ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t)
ffebad_string (ffeintrin_gens_[gen].name);
ffebad_finish ();
}
if (ffeintrin_imps_[imp].y2kbad)
{
ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
ffebad_here (0, ffelex_token_where_line (t),
ffelex_token_where_column (t));
ffebad_string (ffeintrin_gens_[gen].name);
ffebad_finish ();
}
}
}
@ -1489,6 +1510,14 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffebad_string (name);
ffebad_finish ();
}
if (ffeintrin_imps_[imp].y2kbad)
{
ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
ffebad_here (0, ffelex_token_where_line (t),
ffelex_token_where_column (t));
ffebad_string (name);
ffebad_finish ();
}
}
}

View File

@ -3006,6 +3006,12 @@ DEFSPEC (NONE,
CONTROL -- A control string, described below.
The DEFIMPY macro specifies the above, plus:
Y2KBAD -- TRUE if the intrinsic is known to be non-Y2K-compliant,
FALSE if it is known to be Y2K-compliant. (In terms of
interface and libg2c implementation.)
*/
/* The control string has the following format:
@ -3232,7 +3238,7 @@ DEFIMP (COMPLEX, "COMPLEX", ,,, "C=:*:Real=S*,Imag=S*")
DEFIMP (CPU_TIME, "CPU_TIME", SECOND,,, "--:-:Seconds=R*w")
DEFIMP (CTIME_func, "CTIME_func", CTIME,,, "A1*:-:STime=I*")
DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:Result=A1w,STime=I*")
DEFIMP (DATE, "DATE", DATE,,, "--:-:Date=A1w")
DEFIMPY (DATE, "DATE", DATE,,, "--:-:Date=A1w", TRUE)
DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w")
DEFIMP (DBESJ0, "DBESJ0", L_BESJ0,,, "R2:-:X=R2")
DEFIMP (DBESJ1, "DBESJ1", L_BESJ1,,, "R2:-:X=R2")
@ -3289,7 +3295,7 @@ DEFIMP (IBCLR, "IBCLR", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IBITS, "IBITS", ,,, "I=:0:I=I*,Pos=I*,Len=I*")
DEFIMP (IBSET, "IBSET", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IDATE_unix, "IDATE_unix", IDATE,,, "--:-:TArray=I1(3)w")
DEFIMP (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w")
DEFIMPY (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w", TRUE)
DEFIMP (IEOR, "IEOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IOR, "IOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IERRNO, "IERRNO", IERRNO,,, "I1:-:")

View File

@ -51,11 +51,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE,
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
FFEINTRIN_gen
} ffeintrinGen;
@ -65,11 +67,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE,
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
FFEINTRIN_spec
} ffeintrinSpec;
@ -80,11 +84,14 @@ typedef enum
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
FFEINTRIN_imp ## CODE,
#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
FFEINTRIN_imp ## CODE,
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
#undef DEFIMPY
FFEINTRIN_imp
} ffeintrinImp;

View File

@ -9,7 +9,7 @@
@c The text of this file appears in the file BUGS
@c in the G77 distribution, as well as in the G77 manual.
@c 1999-03-03
@c 1999-03-06
@ifclear NEWSONLY
@node News
@ -81,6 +81,16 @@ Source file names with the suffixes @samp{.FOR} and @samp{.FPP}
now are recognized by @code{g77}
as if they ended in @samp{.for} and @samp{.fpp}, respectively.
@item
@code{g77} now warns about a reference to an intrinsic
that has an interface that is not Year 2000 (Y2K) compliant.
Also, the @code{libg2c} has been changed to increase the likelihood
of catching references to the implementations of these intrinsics
using the @samp{EXTERNAL} mechanism
(which would avoid the new warnings).
@xref{Year 2000 (Y2K) Problems}, for more information.
@item
@code{g77} now warns about a reference to a function
when the corresponding @emph{subsequent} function program unit

View File

@ -1 +1 @@
char *ffe_version_string = "0.5.24-19990219";
char *ffe_version_string = "0.5.24-19990306";

View File

@ -1,3 +1,17 @@
1999-03-06 Craig Burley <craig@jcb-sc.com>
Rename non-Y2K-compliant intrinsics:
* Makefile.in (F2CEXT): Now two versions each of
`date' and `vxtidt'.
* f2cext.c (date_, vxtidate_): Split into two versions,
the existing one calling a new "y2kbuggy" routine that
does not exist, and a new one named with "y2kbug" that
calls the newly renamed underlying routine.
* libU77/date_.c (G77_date_y2kbug_0): Rename from G77_date_0.
* libU77/vxtidate_.c (G77_vxtidate_y2kbug_0): Rename from
G77_vxtidate_0.
* libU77/Version.c: Bump version.
1999-03-03 Craig Burley <craig@jcb-sc.com>
* libU77/vxtidate_.c (G77_vxtidate_0): Truncate

View File

@ -75,12 +75,13 @@ SUBDIRS = libI77 libF77 libU77
F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \
signal system flush ftell fseek access besj0 besj1 besjn besy0 besy1 \
besyn chdir chmod ctime date dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
besyn chdir chmod ctime dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
dtime etime fdate fgetc fget flush1 fnum fputc fput fstat gerror \
getcwd getgid getlog getpid getuid gmtime hostnm idate ierrno irand \
isatty itime kill link lnblnk lstat ltime mclock perror rand rename \
secnds second sleep srand stat symlnk time ttynam umask unlink \
vxtidt vxttim alarm
vxttim alarm \
date_y2kbuggy date_y2kbug vxtidt_y2kbuggy vxtidt_y2kbug
.SUFFIXES:

View File

@ -203,10 +203,23 @@ void ctime_ (char *chtime, const ftnlen Lchtime, longint *xstime) {
}
#endif
#ifdef Ldate
#ifdef Ldate_y2kbuggy
int date_ (char *buf, ftnlen buf_len) {
extern int G77_date_0 (char *buf, ftnlen buf_len);
return G77_date_0 (buf, buf_len);
/* Fail to link, so user sees attempt to invoke non-Y2K-compliant
routine. */
extern int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len);
return G77_date_y2kbuggy_0 (buf, buf_len);
}
#endif
#ifdef Ldate_y2kbug
int date_y2kbug__ (char *buf, ftnlen buf_len) {
/* If user wants to invoke the non-Y2K-compliant routine via
an `EXTERNAL' interface, avoiding the warning via g77's
`INTRINSIC' interface, force coding of "y2kbug" string in
user's program. */
extern int G77_date_y2kbug_0 (char *buf, ftnlen buf_len);
return G77_date_y2kbug_0 (buf, buf_len);
}
#endif
@ -540,10 +553,23 @@ integer unlink_ (const char *str, const ftnlen Lstr) {
}
#endif
#ifdef Lvxtidt
#ifdef Lvxtidt_y2kbuggy
int vxtidate_ (integer *m, integer *d, integer *y) {
extern int G77_vxtidate_0 (integer *m, integer *d, integer *y);
return G77_vxtidate_0 (m, d, y);
/* Fail to link, so user sees attempt to invoke non-Y2K-compliant
routine. */
extern int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y);
return G77_vxtidate_y2kbuggy_0 (m, d, y);
}
#endif
#ifdef Lvxtidt_y2kbug
int vxtidate_y2kbug__ (integer *m, integer *d, integer *y) {
/* If user wants to invoke the non-Y2K-compliant routine via
an `EXTERNAL' interface, avoiding the warning via g77's
`INTRINSIC' interface, force coding of "y2kbug" string in
user's program. */
extern int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y);
return G77_vxtidate_y2kbug_0 (m, d, y);
}
#endif

View File

@ -1,6 +1,6 @@
static char junk[] = "\n@(#) LIBU77 VERSION 19980709\n";
char __G77_LIBU77_VERSION__[] = "0.5.24-19990115";
char __G77_LIBU77_VERSION__[] = "0.5.24-19990306";
#include <stdio.h>

View File

@ -9,7 +9,7 @@
static integer c__5 = 5;
/* Subroutine */ int G77_date_0 (char *buf, ftnlen buf_len)
/* Subroutine */ int G77_date_y2kbug_0 (char *buf, ftnlen buf_len)
{
/* System generated locals */
address a__1[5];

View File

@ -38,10 +38,10 @@ Boston, MA 02111-1307, USA. */
/* Subroutine */
#ifdef KR_headers
int G77_vxtidate_0 (m, d, y)
int G77_vxtidate_y2kbug_0 (m, d, y)
integer *y, *m, *d;
#else
int G77_vxtidate_0 (integer *m, integer *d, integer *y)
int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y)
#endif
{
struct tm *lt;