From 06fc83288339328f3d3054b66031a0bef799f69c Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Mon, 11 Dec 2006 00:57:18 +0000 Subject: [PATCH] - get_fname.F90 was trying to call gmtime() with two arguments, from inspection it appears this function was really wanting to call gmtime_r() - Fortran appends a trailing _ to functions it calls, cutil.c has a bunch of shim functions that simply have the trailing _ and call the 'c' equivalent. Added gmtime_r_ -> gmtime_r shim to cutil.c This fixes the mysterious missing gmtime() seen in some compiles of Audio.so I don't see how this get_fname.F90 ever worked to produce the proper filename for the .WAV; I'd like Joe's opinion. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@314 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- cutil.c | 6 +++++- get_fname.F90 | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cutil.c b/cutil.c index c0de1afb7..e7476eda2 100644 --- a/cutil.c +++ b/cutil.c @@ -67,7 +67,11 @@ int exit_(int *n) printf("\n\n"); exit(*n); } - +struct tm * +gmtime_r_(const time_t *clock, struct tm *result) +{ + gmtime_r(clock, result); +} time_t time_(void) { return time(0); diff --git a/get_fname.F90 b/get_fname.F90 index f33f5d44d..0c7ee1468 100644 --- a/get_fname.F90 +++ b/get_fname.F90 @@ -5,6 +5,7 @@ subroutine get_fname(hiscall,ntime,trperiod,lauto,fname) use dfport #endif + external gmtime_r character hiscall*12,fname*24,tag*7 integer ntime integer trperiod @@ -13,7 +14,7 @@ subroutine get_fname(hiscall,ntime,trperiod,lauto,fname) n1=ntime n2=(n1+2)/trperiod n3=n2*trperiod - call gmtime(n3,it) + call gmtime_r(n3,it) it(5)=it(5)+1 it(6)=mod(it(6),100) write(fname,1000) (it(j),j=6,1,-1)