Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
58 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libf2c/libU77/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3838@SET_MAKE@
    3939
    40 SHELL = /bin/sh
     40SHELL = @SHELL@
    4141
    4242#### End of system configuration section. ####
     
    4444# fio.h is in libI77.  config.h is in `.'.
    4545ALL_CFLAGS = -I. -I$(srcdir) -I$(F2C_H_DIR)/libI77 -I$(G2C_H_DIR) \
    46              -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS)
     46             -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(WARN_CFLAGS) $(CFLAGS)
    4747
    4848# This could probably be done more elegantly, but it's currently
  • branches/GNU/src/gcc/libf2c/libU77/Version.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1 static char junk[] = "\n@(#) LIBU77 VERSION 19980709\n";
    2 
    3 char __G77_LIBU77_VERSION__[] = "3.2.2 20030205 (release)";
    4 
    5 #include <stdio.h>
    6 
    7 void
    8 g77__uvers__ ()
    9 {
    10   fprintf (stderr, "__G77_LIBU77_VERSION__: %s", __G77_LIBU77_VERSION__);
    11   fputs (junk, stderr);
    12 }
     1const char __LIBU77_VERSION__[] = "@(#) LIBU77 VERSION 19980709\n";
  • branches/GNU/src/gcc/libf2c/libU77/access_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4646#endif
    4747
    48 #ifdef KR_headers
    49 void g_char ();
     48void g_char (const char *a, ftnlen alen, char *b);
    5049
    51 integer G77_access_0 (name, mode, Lname, Lmode)
    52      char *name, *mode;
    53      ftnlen Lname, Lmode;
    54 #else
    55 void g_char(const char *a, ftnlen alen, char *b);
    56 
    57 integer G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode)
    58 #endif
     50integer
     51G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode)
    5952{
    6053  char *buff;
    61   char *bp, *blast;
    6254  int amode, i;
    6355
    64   buff = malloc (Lname+1);
    65   if (!buff) return -1;
     56  buff = malloc (Lname + 1);
     57  if (!buff)
     58    return -1;
    6659  g_char (name, Lname, buff);
    6760  amode = 0;
    68   for (i=0;i<Lmode;i++) {
    69     switch (mode[i]) {
    70     case 'r': amode |= R_OK; break;
    71     case 'w': amode |= W_OK; break;
    72     case 'x': amode |= X_OK; break;
    73     case ' ': amode |= F_OK; break; /* as per Sun, at least */
    74     default: return EINVAL;
     61  for (i = 0; i < Lmode; i++)
     62    {
     63      switch (mode[i])
     64        {
     65        case 'r':
     66          amode |= R_OK;
     67          break;
     68        case 'w':
     69          amode |= W_OK;
     70          break;
     71        case 'x':
     72          amode |= X_OK;
     73          break;
     74        case ' ':
     75          amode |= F_OK;
     76          break;                /* as per Sun, at least */
     77        default:
     78          return EINVAL;
     79        }
    7580    }
    76   }
    7781  i = access (buff, amode);
    7882  free (buff);
  • branches/GNU/src/gcc/libf2c/libU77/alarm_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3030#ifndef RETSIGTYPE
    3131/* we shouldn't rely on this... */
    32 #ifdef KR_headers
    33 #define RETSIGTYPE int
    34 #else
    3532#define RETSIGTYPE void
    3633#endif
    37 #endif
    38 typedef RETSIGTYPE (*sig_type)();
     34typedef RETSIGTYPE (*sig_type) ();
    3935
    40 #ifdef KR_headers
    41 extern sig_type signal();
    42 #else
    4336#include <signal.h>
    44 typedef int (*sig_proc)(int);
    45 #endif
     37typedef int (*sig_proc) (int);
    4638
    4739#ifndef SIG_ERR
     
    4941#endif
    5042
    51 #ifdef KR_headers
    52 integer G77_alarm_0 (seconds, proc)
    53      integer *seconds;
    54      sig_type proc;
    55 #else
    56 integer G77_alarm_0 (integer *seconds, sig_proc proc)
    57 #endif
     43integer
     44G77_alarm_0 (integer * seconds, sig_proc proc)
    5845{
    5946  int status;
    6047#if defined (HAVE_ALARM) && defined (SIGALRM)
    61   if (signal(SIGALRM, (sig_type)proc) == SIG_ERR)
     48  if (signal (SIGALRM, (sig_type) proc) == SIG_ERR)
    6249    status = -1;
    6350  else
  • branches/GNU/src/gcc/libf2c/libU77/bes.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1717Boston, MA 02111-1307, USA.  */
    1818
    19 #if 0   /* Don't include these unless necessary -- jcb. */
     19#if 0                           /* Don't include these unless necessary -- jcb. */
    2020#include "f2c.h"
    2121#include <math.h>
    2222
    23 double G77_besj0_0 (const real *x) {
    24     return j0 (*x);
     23double
     24G77_besj0_0 (const real * x)
     25{
     26  return j0 (*x);
    2527}
    2628
    27 double G77_besj1_0 (const real *x) {
    28     return j1 (*x);
     29double
     30G77_besj1_0 (const real * x)
     31{
     32  return j1 (*x);
    2933}
    3034
    31 double G77_besjn_0 (const integer *n, real *x) {
    32      return jn (*n, *x);
    33  }
    34 
    35 double G77_besy0_0 (const real *x) {
    36     return y0 (*x);
     35double
     36G77_besjn_0 (const integer * n, real * x)
     37{
     38  return jn (*n, *x);
    3739}
    3840
    39 double G77_besy1_0 (const real *x) {
    40     return y1 (*x);
     41double
     42G77_besy0_0 (const real * x)
     43{
     44  return y0 (*x);
    4145}
    4246
    43 double G77_besyn_0 (const integer *n, real *x) {
    44     return yn (*n, *x);
     47double
     48G77_besy1_0 (const real * x)
     49{
     50  return y1 (*x);
     51}
     52
     53double
     54G77_besyn_0 (const integer * n, real * x)
     55{
     56  return yn (*n, *x);
    4557}
    4658#endif
  • branches/GNU/src/gcc/libf2c/libU77/chdir_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3333
    3434
    35 #ifdef KR_headers
    36 void g_char ();
     35void g_char (const char *a, ftnlen alen, char *b);
    3736
    38 integer G77_chdir_0 (name, Lname)
    39      char *name;
    40      ftnlen Lname;
    41 #else
    42 void g_char(const char *a, ftnlen alen, char *b);
    43 
    44 integer G77_chdir_0 (const char *name, const ftnlen Lname)
    45 #endif
     37integer
     38G77_chdir_0 (const char *name, const ftnlen Lname)
    4639{
    4740  char *buff;
    48   char *bp, *blast;
    4941  int i;
    5042
    51   buff = malloc (Lname+1);
    52   if (!buff) return -1;
     43  buff = malloc (Lname + 1);
     44  if (!buff)
     45    return -1;
    5346  g_char (name, Lname, buff);
    5447  i = chdir (buff);
  • branches/GNU/src/gcc/libf2c/libU77/chmod_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4242#endif
    4343
    44 #ifdef KR_headers
    45 extern void s_cat ();
    46 void g_char ();
     44extern void s_cat (char *lp, char *rpp[], ftnlen rnp[], ftnlen * np,
     45                   ftnlen ll);
     46void g_char (const char *a, ftnlen alen, char *b);
    4747
    48 integer G77_chmod_0 (name, mode, Lname, Lmode)
    49      char *name, *mode;
    50      ftnlen Lname, Lmode;
    51 #else
    52 extern void s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll);
    53 void g_char(const char *a, ftnlen alen, char *b);
    54 
    55 integer G77_chmod_0 (/* const */ char *name, /* const */ char *mode, const ftnlen Lname, const ftnlen Lmode)
    56 #endif
     48integer
     49G77_chmod_0 ( /* const */ char *name, /* const */ char *mode,
     50             const ftnlen Lname, const ftnlen Lmode)
    5751{
    5852  char *buff;
    59   char *bp, *blast;
    6053  int i;
    6154  ftnlen l, l2;
     
    6356  address a[6];
    6457  ftnlen ii[6];
    65   char chmod_path [] = CHMOD_PATH;
     58  char chmod_path[] = CHMOD_PATH;
    6659  l = strlen (chmod_path);
    67   buff = malloc (Lname+Lmode+l+3+13+1);
    68   if (!buff) return -1;
    69   ii[0] = l; a[0] = chmod_path;
    70   ii[1] = 1; a[1] = " ";
    71   ii[2] = Lmode; a[2] = mode;
    72   ii[3] = 2; a[3] = " '";
    73   for (l2=Lname; (l2 > 1) && (name[l2-1] == ' '); )
     60  buff = malloc (Lname + Lmode + l + 3 + 13 + 1);
     61  if (!buff)
     62    return -1;
     63  ii[0] = l;
     64  a[0] = chmod_path;
     65  ii[1] = 1;
     66  a[1] = " ";
     67  ii[2] = Lmode;
     68  a[2] = mode;
     69  ii[3] = 2;
     70  a[3] = " '";
     71  for (l2 = Lname; (l2 > 1) && (name[l2 - 1] == ' ');)
    7472    l2--;
    75   ii[4] = l2; a[4] = name;
    76   ii[5] = 13; a[5] = "' 2>/dev/null";
    77   s_cat (buff, a, ii, &six, Lname+Lmode+l+3+13);
    78   buff[Lname+Lmode+l+3+13] = '\0';
     73  ii[4] = l2;
     74  a[4] = name;
     75  ii[5] = 13;
     76  a[5] = "' 2>/dev/null";
     77  s_cat (buff, a, ii, &six, Lname + Lmode + l + 3 + 13);
     78  buff[Lname + Lmode + l + 3 + 13] = '\0';
    7979  i = system (buff);
    8080  free (buff);
  • branches/GNU/src/gcc/libf2c/libU77/config.hin

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#undef CHMOD_PATH
    3535
     36/* Define if your gettimeofday takes only one argument. */
     37#undef GETTIMEOFDAY_ONE_ARGUMENT
     38
     39/* Define if your gettimeofday takes a time zome argument. */
     40#undef HAVE_TIMEZONE
     41
    3642/* Define if you have the alarm function.  */
    3743#undef HAVE_ALARM
     
    5460/* Define if you have the getrusage function.  */
    5561#undef HAVE_GETRUSAGE
     62
     63/* Define if you have the gettimeofday function.  */
     64#undef HAVE_GETTIMEOFDAY
    5665
    5766/* Define if you have the getuid function.  */
  • branches/GNU/src/gcc/libf2c/libU77/configure

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2929silent=
    3030site=
     31sitefile=
    3132srcdir=
    3233target=NONE
     
    143144  --no-create             do not create output files
    144145  --quiet, --silent       do not print \`checking...' messages
     146  --site-file=FILE        use FILE as the site file
    145147  --version               print the version of autoconf that created configure
    146148Directory and file names:
     
    313315    site="$ac_optarg" ;;
    314316
     317  -site-file | --site-file | --site-fil | --site-fi | --site-f)
     318    ac_prev=sitefile ;;
     319  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
     320    sitefile="$ac_optarg" ;;
     321
    315322  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    316323    ac_prev=srcdir ;;
     
    478485
    479486# Prefer explicitly selected file to automatically selected ones.
    480 if test -z "$CONFIG_SITE"; then
    481   if test "x$prefix" != xNONE; then
    482     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
    483   else
    484     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
     487if test -z "$sitefile"; then
     488  if test -z "$CONFIG_SITE"; then
     489    if test "x$prefix" != xNONE; then
     490      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
     491    else
     492      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
     493    fi
    485494  fi
     495else
     496  CONFIG_SITE="$sitefile"
    486497fi
    487498for ac_site_file in $CONFIG_SITE; do
     
    524535
    525536
    526 # These defines are necessary to get 64-bit file size support.
    527 
    528 cat >> confdefs.h <<\EOF
    529 #define _XOPEN_SOURCE 500L
    530 EOF
    531 
    532 # The following is needed by irix6.2 so that struct timeval is declared.
    533 cat >> confdefs.h <<\EOF
    534 #define _XOPEN_SOURCE_EXTENDED 1
    535 EOF
    536 
    537 # The following is needed by Solaris2.5.1 so that struct timeval is declared.
    538 cat >> confdefs.h <<\EOF
    539 #define __EXTENSIONS__ 1
    540 EOF
    541 
    542 cat >> confdefs.h <<\EOF
    543 #define _FILE_OFFSET_BITS 64
    544 EOF
    545 
    546 
    547 
    548537
    549538
     
    553542set dummy gcc; ac_word=$2
    554543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    555 echo "configure:556: checking for $ac_word" >&5
     544echo "configure:545: checking for $ac_word" >&5
    556545if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    557546  echo $ac_n "(cached) $ac_c" 1>&6
     
    583572set dummy cc; ac_word=$2
    584573echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    585 echo "configure:586: checking for $ac_word" >&5
     574echo "configure:575: checking for $ac_word" >&5
    586575if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    587576  echo $ac_n "(cached) $ac_c" 1>&6
     
    634623set dummy cl; ac_word=$2
    635624echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    636 echo "configure:637: checking for $ac_word" >&5
     625echo "configure:626: checking for $ac_word" >&5
    637626if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    638627  echo $ac_n "(cached) $ac_c" 1>&6
     
    667656
    668657echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    669 echo "configure:670: checking whether we are using GNU C" >&5
     658echo "configure:659: checking whether we are using GNU C" >&5
    670659if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    671660  echo $ac_n "(cached) $ac_c" 1>&6
     
    676665#endif
    677666EOF
    678 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     667if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    679668  ac_cv_prog_gcc=yes
    680669else
     
    695684CFLAGS=
    696685echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    697 echo "configure:698: checking whether ${CC-cc} accepts -g" >&5
     686echo "configure:687: checking whether ${CC-cc} accepts -g" >&5
    698687if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    699688  echo $ac_n "(cached) $ac_c" 1>&6
     
    727716
    728717
     718# These defines are necessary to get 64-bit file size support.
     719# NetBSD 1.4 header files does not support XOPEN_SOURCE == 600, but it
     720# handles 64-bit file sizes without needing these defines.
     721echo $ac_n "checking whether _XOPEN_SOURCE may be defined""... $ac_c" 1>&6
     722echo "configure:723: checking whether _XOPEN_SOURCE may be defined" >&5
     723cat > conftest.$ac_ext <<EOF
     724#line 725 "configure"
     725#include "confdefs.h"
     726#define _XOPEN_SOURCE 600L
     727#include <unistd.h>
     728int main() {
     729
     730; return 0; }
     731EOF
     732if { (eval echo configure:733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     733  rm -rf conftest*
     734  may_use_xopen_source=yes
     735else
     736  echo "configure: failed program was:" >&5
     737  cat conftest.$ac_ext >&5
     738  rm -rf conftest*
     739  may_use_xopen_source=no
     740fi
     741rm -f conftest*
     742echo "$ac_t""$may_use_xopen_source" 1>&6
     743if test $may_use_xopen_source = yes; then
     744  cat >> confdefs.h <<\EOF
     745#define _XOPEN_SOURCE 600L
     746EOF
     747
     748  # The following is needed by irix6.2 so that struct timeval is declared.
     749  cat >> confdefs.h <<\EOF
     750#define _XOPEN_SOURCE_EXTENDED 1
     751EOF
     752
     753  # The following is needed by Solaris2.5.1 so that struct timeval is declared.
     754  cat >> confdefs.h <<\EOF
     755#define __EXTENSIONS__ 1
     756EOF
     757
     758  cat >> confdefs.h <<\EOF
     759#define _FILE_OFFSET_BITS 64
     760EOF
     761
     762fi
     763
     764
    729765LIBTOOL='$(SHELL) ../libtool'
    730766
     
    739775
    740776echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    741 echo "configure:742: checking whether ${MAKE-make} sets \${MAKE}" >&5
     777echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
    742778set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    743779if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    769805set dummy chmod; ac_word=$2
    770806echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    771 echo "configure:772: checking for $ac_word" >&5
     807echo "configure:808: checking for $ac_word" >&5
    772808if eval "test \"`echo '$''{'ac_cv_path_ac_cv_prog_chmod'+set}'`\" = set"; then
    773809  echo $ac_n "(cached) $ac_c" 1>&6
     
    813849
    814850echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    815 echo "configure:816: checking how to run the C preprocessor" >&5
     851echo "configure:852: checking how to run the C preprocessor" >&5
    816852# On Suns, sometimes $CPP names a directory.
    817853if test -n "$CPP" && test -d "$CPP"; then
     
    828864  # not just through cpp.
    829865  cat > conftest.$ac_ext <<EOF
    830 #line 831 "configure"
     866#line 867 "configure"
    831867#include "confdefs.h"
    832868#include <assert.h>
     
    834870EOF
    835871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    836 { (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     872{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    837873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    838874if test -z "$ac_err"; then
     
    845881  CPP="${CC-cc} -E -traditional-cpp"
    846882  cat > conftest.$ac_ext <<EOF
    847 #line 848 "configure"
     883#line 884 "configure"
    848884#include "confdefs.h"
    849885#include <assert.h>
     
    851887EOF
    852888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    853 { (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     889{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    854890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    855891if test -z "$ac_err"; then
     
    862898  CPP="${CC-cc} -nologo -E"
    863899  cat > conftest.$ac_ext <<EOF
    864 #line 865 "configure"
     900#line 901 "configure"
    865901#include "confdefs.h"
    866902#include <assert.h>
     
    868904EOF
    869905ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    870 { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     906{ (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    871907ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    872908if test -z "$ac_err"; then
     
    893929
    894930echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    895 echo "configure:896: checking for ANSI C header files" >&5
     931echo "configure:932: checking for ANSI C header files" >&5
    896932if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    897933  echo $ac_n "(cached) $ac_c" 1>&6
    898934else
    899935  cat > conftest.$ac_ext <<EOF
    900 #line 901 "configure"
     936#line 937 "configure"
    901937#include "confdefs.h"
    902938#include <stdlib.h>
     
    906942EOF
    907943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    908 { (eval echo configure:909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     944{ (eval echo configure:945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    909945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    910946if test -z "$ac_err"; then
     
    923959  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    924960cat > conftest.$ac_ext <<EOF
    925 #line 926 "configure"
     961#line 962 "configure"
    926962#include "confdefs.h"
    927963#include <string.h>
     
    941977  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    942978cat > conftest.$ac_ext <<EOF
    943 #line 944 "configure"
     979#line 980 "configure"
    944980#include "confdefs.h"
    945981#include <stdlib.h>
     
    962998else
    963999  cat > conftest.$ac_ext <<EOF
    964 #line 965 "configure"
     1000#line 1001 "configure"
    9651001#include "confdefs.h"
    9661002#include <ctype.h>
     
    9731009
    9741010EOF
    975 if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1011if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    9761012then
    9771013  :
     
    9961032fi
    9971033
    998 
    9991034echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    1000 echo "configure:1001: checking whether time.h and sys/time.h may both be included" >&5
     1035echo "configure:1036: checking whether time.h and sys/time.h may both be included" >&5
    10011036if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    10021037  echo $ac_n "(cached) $ac_c" 1>&6
    10031038else
    10041039  cat > conftest.$ac_ext <<EOF
    1005 #line 1006 "configure"
     1040#line 1041 "configure"
    10061041#include "confdefs.h"
    10071042#include <sys/types.h>
     
    10121047; return 0; }
    10131048EOF
    1014 if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1049if { (eval echo configure:1050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    10151050  rm -rf conftest*
    10161051  ac_cv_header_time=yes
     
    10371072ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    10381073echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1039 echo "configure:1040: checking for $ac_hdr" >&5
     1074echo "configure:1075: checking for $ac_hdr" >&5
    10401075if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    10411076  echo $ac_n "(cached) $ac_c" 1>&6
    10421077else
    10431078  cat > conftest.$ac_ext <<EOF
    1044 #line 1045 "configure"
     1079#line 1080 "configure"
    10451080#include "confdefs.h"
    10461081#include <$ac_hdr>
    10471082EOF
    10481083ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1049 { (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1084{ (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    10501085ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    10511086if test -z "$ac_err"; then
     
    10751110
    10761111echo $ac_n "checking for working const""... $ac_c" 1>&6
    1077 echo "configure:1078: checking for working const" >&5
     1112echo "configure:1113: checking for working const" >&5
    10781113if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    10791114  echo $ac_n "(cached) $ac_c" 1>&6
    10801115else
    10811116  cat > conftest.$ac_ext <<EOF
    1082 #line 1083 "configure"
     1117#line 1118 "configure"
    10831118#include "confdefs.h"
    10841119
     
    11291164; return 0; }
    11301165EOF
    1131 if { (eval echo configure:1132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1166if { (eval echo configure:1167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    11321167  rm -rf conftest*
    11331168  ac_cv_c_const=yes
     
    11501185
    11511186echo $ac_n "checking for size_t""... $ac_c" 1>&6
    1152 echo "configure:1153: checking for size_t" >&5
     1187echo "configure:1188: checking for size_t" >&5
    11531188if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    11541189  echo $ac_n "(cached) $ac_c" 1>&6
    11551190else
    11561191  cat > conftest.$ac_ext <<EOF
    1157 #line 1158 "configure"
     1192#line 1193 "configure"
    11581193#include "confdefs.h"
    11591194#include <sys/types.h>
     
    11831218
    11841219echo $ac_n "checking for mode_t""... $ac_c" 1>&6
    1185 echo "configure:1186: checking for mode_t" >&5
     1220echo "configure:1221: checking for mode_t" >&5
    11861221if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
    11871222  echo $ac_n "(cached) $ac_c" 1>&6
    11881223else
    11891224  cat > conftest.$ac_ext <<EOF
    1190 #line 1191 "configure"
     1225#line 1226 "configure"
    11911226#include "confdefs.h"
    11921227#include <sys/types.h>
     
    12171252
    12181253echo $ac_n "checking for pid_t""... $ac_c" 1>&6
    1219 echo "configure:1220: checking for pid_t" >&5
     1254echo "configure:1255: checking for pid_t" >&5
    12201255if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    12211256  echo $ac_n "(cached) $ac_c" 1>&6
    12221257else
    12231258  cat > conftest.$ac_ext <<EOF
    1224 #line 1225 "configure"
     1259#line 1260 "configure"
    12251260#include "confdefs.h"
    12261261#include <sys/types.h>
     
    12501285
    12511286echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
    1252 echo "configure:1253: checking for st_blksize in struct stat" >&5
     1287echo "configure:1288: checking for st_blksize in struct stat" >&5
    12531288if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
    12541289  echo $ac_n "(cached) $ac_c" 1>&6
    12551290else
    12561291  cat > conftest.$ac_ext <<EOF
    1257 #line 1258 "configure"
     1292#line 1293 "configure"
    12581293#include "confdefs.h"
    12591294#include <sys/types.h>
     
    12631298; return 0; }
    12641299EOF
    1265 if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1300if { (eval echo configure:1301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    12661301  rm -rf conftest*
    12671302  ac_cv_struct_st_blksize=yes
     
    12841319
    12851320echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
    1286 echo "configure:1287: checking for st_blocks in struct stat" >&5
     1321echo "configure:1322: checking for st_blocks in struct stat" >&5
    12871322if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
    12881323  echo $ac_n "(cached) $ac_c" 1>&6
    12891324else
    12901325  cat > conftest.$ac_ext <<EOF
    1291 #line 1292 "configure"
     1326#line 1327 "configure"
    12921327#include "confdefs.h"
    12931328#include <sys/types.h>
     
    12971332; return 0; }
    12981333EOF
    1299 if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1334if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13001335  rm -rf conftest*
    13011336  ac_cv_struct_st_blocks=yes
     
    13201355
    13211356echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
    1322 echo "configure:1323: checking for st_rdev in struct stat" >&5
     1357echo "configure:1358: checking for st_rdev in struct stat" >&5
    13231358if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
    13241359  echo $ac_n "(cached) $ac_c" 1>&6
    13251360else
    13261361  cat > conftest.$ac_ext <<EOF
    1327 #line 1328 "configure"
     1362#line 1363 "configure"
    13281363#include "confdefs.h"
    13291364#include <sys/types.h>
     
    13331368; return 0; }
    13341369EOF
    1335 if { (eval echo configure:1336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1370if { (eval echo configure:1371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13361371  rm -rf conftest*
    13371372  ac_cv_struct_st_rdev=yes
     
    13541389
    13551390echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
    1356 echo "configure:1357: checking whether struct tm is in sys/time.h or time.h" >&5
     1391echo "configure:1392: checking whether struct tm is in sys/time.h or time.h" >&5
    13571392if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    13581393  echo $ac_n "(cached) $ac_c" 1>&6
    13591394else
    13601395  cat > conftest.$ac_ext <<EOF
    1361 #line 1362 "configure"
     1396#line 1397 "configure"
    13621397#include "confdefs.h"
    13631398#include <sys/types.h>
     
    13671402; return 0; }
    13681403EOF
    1369 if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1404if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13701405  rm -rf conftest*
    13711406  ac_cv_struct_tm=time.h
     
    13891424
    13901425echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
    1391 echo "configure:1392: checking for gethostname in -lsocket" >&5
     1426echo "configure:1427: checking for gethostname in -lsocket" >&5
    13921427ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
    13931428if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    13971432LIBS="-lsocket  $LIBS"
    13981433cat > conftest.$ac_ext <<EOF
    1399 #line 1400 "configure"
     1434#line 1435 "configure"
    14001435#include "confdefs.h"
    14011436/* Override any gcc2 internal prototype to avoid an error.  */
     
    14081443; return 0; }
    14091444EOF
    1410 if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1445if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    14111446  rm -rf conftest*
    14121447  eval "ac_cv_lib_$ac_lib_var=yes"
     
    14341469do
    14351470echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    1436 echo "configure:1437: checking for $ac_func" >&5
     1471echo "configure:1472: checking for $ac_func" >&5
    14371472if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    14381473  echo $ac_n "(cached) $ac_c" 1>&6
    14391474else
    14401475  cat > conftest.$ac_ext <<EOF
    1441 #line 1442 "configure"
     1476#line 1477 "configure"
    14421477#include "confdefs.h"
    14431478/* System header to define __stub macros and hopefully few prototypes,
     
    14621497; return 0; }
    14631498EOF
    1464 if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1499if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    14651500  rm -rf conftest*
    14661501  eval "ac_cv_func_$ac_func=yes"
     
    14911526do
    14921527echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    1493 echo "configure:1494: checking for $ac_func" >&5
     1528echo "configure:1529: checking for $ac_func" >&5
    14941529if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    14951530  echo $ac_n "(cached) $ac_c" 1>&6
    14961531else
    14971532  cat > conftest.$ac_ext <<EOF
    1498 #line 1499 "configure"
     1533#line 1534 "configure"
    14991534#include "confdefs.h"
    15001535/* System header to define __stub macros and hopefully few prototypes,
     
    15191554; return 0; }
    15201555EOF
    1521 if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1556if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    15221557  rm -rf conftest*
    15231558  eval "ac_cv_func_$ac_func=yes"
     
    15451580  if test "$ac_cv_func_gettimeofday" = yes; then
    15461581    echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
    1547 echo "configure:1548: checking for struct timezone" >&5
     1582echo "configure:1583: checking for struct timezone" >&5
    15481583if eval "test \"`echo '$''{'g77_cv_struct_timezone'+set}'`\" = set"; then
    15491584  echo $ac_n "(cached) $ac_c" 1>&6
    15501585else
    15511586  cat > conftest.$ac_ext <<EOF
    1552 #line 1553 "configure"
     1587#line 1588 "configure"
    15531588#include "confdefs.h"
    15541589#include <sys/time.h>
     
    15571592; return 0; }
    15581593EOF
    1559 if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1594if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    15601595  rm -rf conftest*
    15611596  g77_cv_struct_timezone=yes
     
    15781613else
    15791614  cat > conftest.$ac_ext <<EOF
    1580 #line 1581 "configure"
     1615#line 1616 "configure"
    15811616#include "confdefs.h"
    15821617
     
    16011636}
    16021637EOF
    1603 if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1638if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    16041639then
    16051640  cat >> confdefs.h <<\EOF
     
    16171652   
    16181653    echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
    1619 echo "configure:1620: checking whether gettimeofday can accept two arguments" >&5
     1654echo "configure:1655: checking whether gettimeofday can accept two arguments" >&5
    16201655if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
    16211656  echo $ac_n "(cached) $ac_c" 1>&6
    16221657else
    16231658  cat > conftest.$ac_ext <<EOF
    1624 #line 1625 "configure"
     1659#line 1660 "configure"
    16251660#include "confdefs.h"
    16261661
     
    16481683; return 0; }
    16491684EOF
    1650 if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1685if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16511686  rm -rf conftest*
    16521687  emacs_cv_gettimeofday_two_arguments=yes
  • branches/GNU/src/gcc/libf2c/libU77/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2424AC_CONFIG_HEADER(config.h:config.hin)
    2525
    26 # These defines are necessary to get 64-bit file size support.
    27 
    28 AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
    29 # The following is needed by irix6.2 so that struct timeval is declared.
    30 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics])
    31 # The following is needed by Solaris2.5.1 so that struct timeval is declared.
    32 AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions])
    33 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
    34 
    35 dnl Checks for programs.
    36 
    3726dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
    3827dnl not be able to.
     
    4231# the makefiles
    4332AC_PROG_CC
     33
     34# These defines are necessary to get 64-bit file size support.
     35# NetBSD 1.4 header files does not support XOPEN_SOURCE == 600, but it
     36# handles 64-bit file sizes without needing these defines.
     37AC_MSG_CHECKING(whether _XOPEN_SOURCE may be defined)
     38AC_TRY_COMPILE([#define _XOPEN_SOURCE 600L
     39#include <unistd.h>],,
     40may_use_xopen_source=yes,
     41may_use_xopen_source=no)
     42AC_MSG_RESULT($may_use_xopen_source)
     43if test $may_use_xopen_source = yes; then
     44  AC_DEFINE(_XOPEN_SOURCE, 600L, [Get Single Unix Specification semantics])
     45  # The following is needed by irix6.2 so that struct timeval is declared.
     46  AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics])
     47  # The following is needed by Solaris2.5.1 so that struct timeval is declared.
     48  AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions])
     49  AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
     50fi
     51
     52dnl Checks for programs.
    4453
    4554LIBTOOL='$(SHELL) ../libtool'
     
    7180dnl Checks for header files.
    7281AC_HEADER_STDC
    73 dnl We could do this if we didn't know we were using gcc
    74 dnl AC_MSG_CHECKING(for prototype-savvy compiler)
    75 dnl AC_CACHE_VAL(ac_cv_sys_proto,               
    76 dnl   [AC_TRY_LINK(,                             
    77 dnl dnl looks screwy because TRY_LINK expects a function body
    78 dnl    [return 0;} int foo (int * bar) {],       
    79 dnl    ac_cv_sys_proto=yes,                     
    80 dnl    [ac_cv_sys_proto=no                       
    81 dnl     AC_DEFINE(KR_headers)])])               
    82 dnl AC_MSG_RESULT($ac_cv_sys_proto)             
    83 
    8482AC_HEADER_TIME
    8583AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \
  • branches/GNU/src/gcc/libf2c/libU77/ctime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4040/* may need sys/time.h & long arg for stime (bsd, svr1-3) */
    4141
    42 #ifdef KR_headers
    43 /* Character */ void G77_ctime_0 (chtime, Lchtime, xstime)
    44      char *chtime;
    45      longint * xstime;
    46      ftnlen Lchtime;
    47 #else
    48 /* Character */ void G77_ctime_0 (char *chtime, const ftnlen Lchtime, longint * xstime)
    49 #endif
     42/* Character */ void
     43G77_ctime_0 (char *chtime, const ftnlen Lchtime, longint * xstime)
    5044{
    51   int i, l;
    5245  int s_copy ();
    5346  time_t stime = *xstime;
  • branches/GNU/src/gcc/libf2c/libU77/date_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1010static integer c__5 = 5;
    1111
    12 /* Subroutine */ int G77_date_y2kbug_0 (char *buf, ftnlen buf_len)
     12/* Subroutine */ int
     13G77_date_y2kbug_0 (char *buf, ftnlen buf_len)
    1314{
    14     /* System generated locals */
    15     address a__1[5];
    16     longint i__1;
    17     integer i__2[5];
    18     char ch__1[24];
     15  /* System generated locals */
     16  address a__1[5];
     17  longint i__1;
     18  integer i__2[5];
     19  char ch__1[24];
    1920
    20     /* Builtin functions */
    21     /* Subroutine */ int s_copy(), s_cat();
     21  /* Builtin functions */
     22  /* Subroutine */ int s_copy (), s_cat ();
    2223
    23     /* Local variables */
    24     static char cbuf[24];
    25     extern longint G77_time_0 ();
    26     extern /* Character */ VOID G77_ctime_0 ();
     24  /* Local variables */
     25  static char cbuf[24];
     26  extern longint G77_time_0 ();
     27  extern /* Character */ void G77_ctime_0 ();
    2728
    28     i__1 = G77_time_0 ();
    29     G77_ctime_0 (ch__1, 24L, &i__1);
    30     s_copy(cbuf, ch__1, 24L, 24L);
     29  i__1 = G77_time_0 ();
     30  G77_ctime_0 (ch__1, 24L, &i__1);
     31  s_copy (cbuf, ch__1, 24L, 24L);
    3132/* Writing concatenation */
    32     i__2[0] = 2, a__1[0] = cbuf + 8;
    33     i__2[1] = 1, a__1[1] = "-";
    34     i__2[2] = 3, a__1[2] = cbuf + 4;
    35     i__2[3] = 1, a__1[3] = "-";
    36     i__2[4] = 2, a__1[4] = cbuf + 22;
    37     s_cat(buf, a__1, i__2, &c__5, buf_len);
    38     return 0;
    39 } /* date_ */
     33  i__2[0] = 2, a__1[0] = cbuf + 8;
     34  i__2[1] = 1, a__1[1] = "-";
     35  i__2[2] = 3, a__1[2] = cbuf + 4;
     36  i__2[3] = 1, a__1[3] = "-";
     37  i__2[4] = 2, a__1[4] = cbuf + 22;
     38  s_cat (buf, a__1, i__2, &c__5, buf_len);
     39  return 0;
     40}                               /* date_ */
    4041
    4142#ifdef PIC
     
    4344
    4445const char *G77_Non_Y2K_Compliance_Message =
    45    "Call to non Y2K compliant subroutine detected.";
     46  "Call to non Y2K compliant subroutine detected.";
    4647
    47 int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len)
     48int
     49G77_date_y2kbuggy_0 (char *buf __attribute__ ((__unused__)),
     50                     ftnlen buf_len __attribute__ ((__unused__)))
    4851{
    49   extern int G77_abort_0();
     52  extern int G77_abort_0 ();
    5053  fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
    51   G77_abort_0();
     54  G77_abort_0 ();
    5255}
    5356#endif
    54 
    55 
  • branches/GNU/src/gcc/libf2c/libU77/datetime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3232# endif
    3333#endif
     34#if defined (_WIN32)
     35#include <windows.h>
     36#undef min
     37#undef max
     38#endif
    3439#include "f2c.h"
    3540
    36 #ifdef KR_headers
    37 VOID s_copy ();
    38 #else
    39 void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    40 #endif
     41void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
    4142
    42 int G77_date_and_time_0 (char *date, char *fftime, char *zone,
    43                          integer *values, ftnlen date_len,
    44                          ftnlen fftime_len, ftnlen zone_len)
     43int
     44G77_date_and_time_0 (char *date, char *fftime, char *zone,
     45                     integer * values, ftnlen date_len,
     46                     ftnlen fftime_len, ftnlen zone_len)
    4547{
    46   time_t lt=time(&lt);
    47   struct tm ltime = *localtime(&lt), gtime = *gmtime(&lt);
     48  time_t lt = time (&lt);
     49  struct tm ltime = *localtime (&lt), gtime = *gmtime (&lt);
    4850  char dat[9], zon[6], ftim[11];
    4951  int i, vals[8];
     52#if defined (_WIN32)
     53    struct _SYSTEMTIME wdattim;
     54    GetLocalTime(&wdattim);
     55    vals[7] = wdattim.wMilliseconds;
     56#else
     57  vals[7] = 0;                  /* no STDC/POSIX way to get this */
     58  /* GNUish way; maybe use `ftime' on other systems. */
     59#endif
    5060
    5161  vals[0] = 1900 + ltime.tm_year;
     
    5464  /* fixme: year boundaries */
    5565  vals[3] = (ltime.tm_min - gtime.tm_min +
    56              60*(ltime.tm_hour - gtime.tm_hour +
    57                  24*(ltime.tm_yday -gtime.tm_yday)));
     66             60 * (ltime.tm_hour - gtime.tm_hour +
     67                   24 * (ltime.tm_yday - gtime.tm_yday)));
    5868  vals[4] = ltime.tm_hour;
    5969  vals[5] = ltime.tm_min;
    6070  vals[6] = ltime.tm_sec;
    61   vals[7] = 0;                  /* no STDC/POSIX way to get this */
    62   /* GNUish way; maybe use `ftime' on other systems. */
    6371#if HAVE_GETTIMEOFDAY
    6472  {
    6573    struct timeval tp;
    6674#  if GETTIMEOFDAY_ONE_ARGUMENT
    67     if (! gettimeofday (&tp))
     75    if (!gettimeofday (&tp))
    6876#  else
    6977#    if HAVE_STRUCT_TIMEZONE
     
    7583       non-NULL arg and pretends that struct timezone is missing if it
    7684       does fail.  */
    77     if (! gettimeofday (&tp, &tzp))
     85    if (!gettimeofday (&tp, &tzp))
    7886#    else
    79     if (! gettimeofday (&tp, (void *) 0))
     87    if (!gettimeofday (&tp, (void *) 0))
    8088#    endif /* HAVE_STRUCT_TIMEZONE */
    8189#  endif /* GETTIMEOFDAY_ONE_ARGUMENT */
    82       vals[7] = tp.tv_usec/1000;
     90      vals[7] = tp.tv_usec / 1000;
    8391  }
    8492#endif /* HAVE_GETTIMEOFDAY */
    8593  if (values)                   /* null pointer for missing optional */
    86     for (i=0; i<=7; i++)
     94    for (i = 0; i <= 7; i++)
    8795      values[i] = vals[i];
    8896  sprintf (dat, "%04d%02d%02d", vals[0], vals[1], vals[2]);
    89   s_copy(date, dat, date_len, 8);
    90   if (zone) {
    91     sprintf(zon, "%+03d%02d", vals[3] / 60, abs(vals[3] % 60));
    92     s_copy(zone, zon, zone_len, 5);
    93   }
    94   if (fftime) {
    95     sprintf (ftim, "%02d%02d%02d.%03d", vals[4], vals[5], vals[6], vals[7]);
    96     s_copy(fftime, ftim, fftime_len, 10);
    97   }
     97  s_copy (date, dat, date_len, 8);
     98  if (zone)
     99    {
     100      sprintf (zon, "%+03d%02d", vals[3] / 60, abs (vals[3] % 60));
     101      s_copy (zone, zon, zone_len, 5);
     102    }
     103  if (fftime)
     104    {
     105      sprintf (ftim, "%02d%02d%02d.%03d", vals[4], vals[5], vals[6], vals[7]);
     106      s_copy (fftime, ftim, fftime_len, 10);
     107    }
    98108  return 0;
    99109}
  • branches/GNU/src/gcc/libf2c/libU77/dbes.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1717Boston, MA 02111-1307, USA.  */
    1818
    19 #if 0   /* Don't include these unless necessary -- dnp. */
     19#if 0                           /* Don't include these unless necessary -- dnp. */
    2020#include "f2c.h"
    2121#include <math.h>
    2222
    23 double G77_dbesj0_0 (const double *x) {
    24     return j0 (*x);
     23double
     24G77_dbesj0_0 (const double *x)
     25{
     26  return j0 (*x);
    2527}
    2628
    27 double G77_dbesj1_0 (const double *x) {
    28     return j1 (*x);
     29double
     30G77_dbesj1_0 (const double *x)
     31{
     32  return j1 (*x);
    2933}
    3034
    31 double G77_dbesjn_0 (const integer *n, double *x) {
    32      return jn (*n, *x);
    33  }
    34 
    35 double G77_dbesy0_0 (const double *x) {
    36     return y0 (*x);
     35double
     36G77_dbesjn_0 (const integer * n, double *x)
     37{
     38  return jn (*n, *x);
    3739}
    3840
    39 double G77_dbesy1_0 (const double *x) {
    40     return y1 (*x);
     41double
     42G77_dbesy0_0 (const double *x)
     43{
     44  return y0 (*x);
    4145}
    4246
    43 double G77_dbesyn_0 (const integer *n, double *x) {
    44     return yn (*n, *x);
     47double
     48G77_dbesy1_0 (const double *x)
     49{
     50  return y1 (*x);
     51}
     52
     53double
     54G77_dbesyn_0 (const integer * n, double *x)
     55{
     56  return yn (*n, *x);
    4557}
    4658#endif
  • branches/GNU/src/gcc/libf2c/libU77/dtime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4545#include "f2c.h"
    4646
    47 /* For dtime, etime we store the clock tick parameter (clk_tck) the
    48    first time either of them is invoked rather than each time.  This
    49    approach probably speeds up each invocation by avoiding a system
    50    call each time, but means that the overhead of the first call is
    51    different to all others. */
    52 static long clk_tck = 0;
    53 
    54 #ifdef KR_headers
    55 double G77_dtime_0 (tarray)
    56      real tarray[2];
    57 #else
    58 double G77_dtime_0 (real tarray[2])
    59 #endif
     47double
     48G77_dtime_0 (real tarray[2])
    6049{
    6150#if defined (_WIN32)
     
    6958      win32_platform = osv.dwPlatformId;
    7059    }
    71  
     60
    7261  /* We need to use this hack on non-NT platforms, where the first call
    7362     returns 0.0 and subsequent ones return the correct value. */
     
    8372        {
    8473          LARGE_INTEGER freq;
    85           if (! QueryPerformanceFrequency (&freq))
     74          if (!QueryPerformanceFrequency (&freq))
    8675            {
    8776              errno = ENOSYS;
     
    9180            {
    9281              clock_freq = ((unsigned long long) freq.HighPart << 32)
    93                            + ((unsigned) freq.LowPart);
     82                + ((unsigned) freq.LowPart);
    9483            }
    9584        }
    9685
    97       if (! QueryPerformanceCounter (&counter_val))
     86      if (!QueryPerformanceCounter (&counter_val))
    9887        return -1.0;
    9988
    10089      count = ((unsigned long long) counter_val.HighPart << 32)
    101               + (unsigned) counter_val.LowPart;
     90        + (unsigned) counter_val.LowPart;
    10291      delta = ((double) (count - old_count)) / clock_freq;
    10392      tarray[0] = (float) delta;
     
    113102      GetProcessTimes (GetCurrentProcess (), &creation_time, &exit_time,
    114103                       &kernel_time, &user_time);
    115       utime = ((unsigned long long) user_time.dwHighDateTime << 32) 
    116               + (unsigned) user_time.dwLowDateTime;
    117       stime = ((unsigned long long) kernel_time.dwHighDateTime << 32) 
    118               + (unsigned) kernel_time.dwLowDateTime;
     104      utime = ((unsigned long long) user_time.dwHighDateTime << 32)
     105        + (unsigned) user_time.dwLowDateTime;
     106      stime = ((unsigned long long) kernel_time.dwHighDateTime << 32)
     107        + (unsigned) kernel_time.dwLowDateTime;
    119108
    120109      tarray[0] = (utime - old_utime) / 1.0e7;
     
    132121  struct rusage rbuff;
    133122
    134    if (getrusage (RUSAGE_SELF, &rbuff) != 0)
    135      abort ();
    136    utime = (float) (rbuff.ru_utime).tv_sec +
    137            (float) (rbuff.ru_utime).tv_usec/1000000.0;
    138    tarray[0] = utime - (float) old_utime;
    139    stime = (float) (rbuff.ru_stime).tv_sec +
    140            (float) (rbuff.ru_stime).tv_usec/1000000.0;
     123  if (getrusage (RUSAGE_SELF, &rbuff) != 0)
     124    abort ();
     125  utime = (float) (rbuff.ru_utime).tv_sec +
     126    (float) (rbuff.ru_utime).tv_usec / 1000000.0;
     127  tarray[0] = utime - (float) old_utime;
     128  stime = (float) (rbuff.ru_stime).tv_sec +
     129    (float) (rbuff.ru_stime).tv_usec / 1000000.0;
    141130  tarray[1] = stime - old_stime;
    142 #else  /* HAVE_GETRUSAGE */
     131#else /* HAVE_GETRUSAGE */
     132  /* For dtime, etime we store the clock tick parameter (clk_tck) the
     133     first time either of them is invoked rather than each time.  This
     134     approach probably speeds up each invocation by avoiding a system
     135     call each time, but means that the overhead of the first call is
     136     different to all others. */
     137  static long clk_tck = 0;
    143138  time_t utime, stime;
    144139  static time_t old_utime = 0, old_stime = 0;
     
    148143   fixme: does using _POSIX_VERSION help? */
    149144#  if defined _SC_CLK_TCK && defined _POSIX_VERSION
    150   if (! clk_tck) clk_tck = sysconf(_SC_CLK_TCK);
     145  if (!clk_tck)
     146    clk_tck = sysconf (_SC_CLK_TCK);
    151147#  elif defined CLOCKS_PER_SECOND
    152   if (! clk_tck) clk_tck = CLOCKS_PER_SECOND;
     148  if (!clk_tck)
     149    clk_tck = CLOCKS_PER_SECOND;
    153150#  elif defined CLK_TCK
    154   if (! clk_tck) clk_tck = CLK_TCK;
     151  if (!clk_tck)
     152    clk_tck = CLK_TCK;
    155153#  elif defined HZ
    156   if (! clk_tck) clk_tck = HZ;
     154  if (!clk_tck)
     155    clk_tck = HZ;
    157156#  elif defined HAVE_GETRUSAGE
    158157#  else
    159   #error Dont know clock tick length
     158#error Dont know clock tick length
    160159#  endif
    161   if (times(&buffer) == (clock_t)-1) return -1.0;
    162   utime = buffer.tms_utime; stime = buffer.tms_stime;
    163   tarray[0] = ((float)(utime - old_utime)) / (float)clk_tck;
    164   tarray[1] = ((float)(stime - old_stime)) / (float)clk_tck;
     160  if (times (&buffer) == (clock_t) - 1)
     161    return -1.0;
     162  utime = buffer.tms_utime;
     163  stime = buffer.tms_stime;
     164  tarray[0] = ((float) (utime - old_utime)) / (float) clk_tck;
     165  tarray[1] = ((float) (stime - old_stime)) / (float) clk_tck;
    165166#endif /* HAVE_GETRUSAGE */
    166   old_utime = utime; old_stime = stime;
    167   return (tarray[0]+tarray[1]);
     167  old_utime = utime;
     168  old_stime = stime;
     169  return (tarray[0] + tarray[1]);
    168170#else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */
    169171  errno = ENOSYS;
  • branches/GNU/src/gcc/libf2c/libU77/etime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4545#include "f2c.h"
    4646
    47 /* For dtime, etime we store the clock tick parameter (clk_tck) the
    48    first time either of them is invoked rather than each time.  This
    49    approach probably speeds up each invocation by avoiding a system
    50    call each time, but means that the overhead of the first call is
    51    different to all others. */
    52 static long clk_tck = 0;
    53 
    54 #ifdef KR_headers
    55 double G77_etime_0 (tarray)
    56      real tarray[2];
    57 #else
    58 double G77_etime_0 (real tarray[2])
    59 #endif
     47double
     48G77_etime_0 (real tarray[2])
    6049{
    6150#if defined (_WIN32)
     
    7059      win32_platform = osv.dwPlatformId;
    7160    }
    72  
     61
    7362  /* non-NT platforms don't have a clue as to how long a process has
    7463     been running, so simply return the uptime. Bad judgement call? */
     
    8372        {
    8473          LARGE_INTEGER freq;
    85           if (! QueryPerformanceFrequency (&freq))
     74          if (!QueryPerformanceFrequency (&freq))
    8675            {
    8776              errno = ENOSYS;
     
    9180            {
    9281              clock_freq = ((unsigned long long) freq.HighPart << 32)
    93                            + ((unsigned) freq.LowPart);
    94               if (! QueryPerformanceCounter (&counter_val))
     82                + ((unsigned) freq.LowPart);
     83              if (!QueryPerformanceCounter (&counter_val))
    9584                return -1.0;
    9685              old_count = ((unsigned long long) counter_val.HighPart << 32)
    97                           + (unsigned) counter_val.LowPart;
     86                + (unsigned) counter_val.LowPart;
    9887            }
    9988        }
    10089
    101       if (! QueryPerformanceCounter (&counter_val))
     90      if (!QueryPerformanceCounter (&counter_val))
    10291        return -1.0;
    10392
    10493      count = ((unsigned long long) counter_val.HighPart << 32)
    105               + (unsigned) counter_val.LowPart;
     94        + (unsigned) counter_val.LowPart;
    10695      tarray[0] = usertime = (double) (count - old_count) / clock_freq;
    10796      tarray[1] = systime = 0.0;
     
    115104                       &kernel_time, &user_time);
    116105      utime = ((unsigned long long) user_time.dwHighDateTime << 32)
    117               + (unsigned) user_time.dwLowDateTime;
     106        + (unsigned) user_time.dwLowDateTime;
    118107      stime = ((unsigned long long) kernel_time.dwHighDateTime << 32)
    119               + (unsigned) kernel_time.dwLowDateTime;
     108        + (unsigned) kernel_time.dwLowDateTime;
    120109
    121110      tarray[0] = usertime = utime / 1.0e7;
    122111      tarray[1] = systime = stime / 1.0e7;
    123   }
     112    }
    124113  return usertime + systime;
    125114
     
    129118  struct rusage rbuff;
    130119
    131    if (getrusage (RUSAGE_SELF, &rbuff) != 0)
    132      abort ();
    133    tarray[0] = ((float) (rbuff.ru_utime).tv_sec +
    134                (float) (rbuff.ru_utime).tv_usec/1000000.0);
    135    tarray[1] = ((float) (rbuff.ru_stime).tv_sec +
    136                (float) (rbuff.ru_stime).tv_usec/1000000.0);
    137 #else  /* HAVE_GETRUSAGE */
     120  if (getrusage (RUSAGE_SELF, &rbuff) != 0)
     121    abort ();
     122  tarray[0] = ((float) (rbuff.ru_utime).tv_sec +
     123               (float) (rbuff.ru_utime).tv_usec / 1000000.0);
     124  tarray[1] = ((float) (rbuff.ru_stime).tv_sec +
     125               (float) (rbuff.ru_stime).tv_usec / 1000000.0);
     126#else /* HAVE_GETRUSAGE */
     127  /* For dtime, etime we store the clock tick parameter (clk_tck) the
     128     first time either of them is invoked rather than each time.  This
     129     approach probably speeds up each invocation by avoiding a system
     130     call each time, but means that the overhead of the first call is
     131     different to all others. */
     132  static long clk_tck = 0;
    138133  struct tms buffer;
    139134
     
    141136   fixme: does using _POSIX_VERSION help? */
    142137#  if defined _SC_CLK_TCK && defined _POSIX_VERSION
    143   if (! clk_tck) clk_tck = sysconf(_SC_CLK_TCK);
     138  if (!clk_tck)
     139    clk_tck = sysconf (_SC_CLK_TCK);
    144140#  elif defined CLOCKS_PER_SECOND
    145   if (! clk_tck) clk_tck = CLOCKS_PER_SECOND;
     141  if (!clk_tck)
     142    clk_tck = CLOCKS_PER_SECOND;
    146143#  elif defined CLK_TCK
    147   if (! clk_tck) clk_tck = CLK_TCK;
     144  if (!clk_tck)
     145    clk_tck = CLK_TCK;
    148146#  elif defined HZ
    149   if (! clk_tck) clk_tck = HZ;
     147  if (!clk_tck)
     148    clk_tck = HZ;
    150149#  elif defined HAVE_GETRUSAGE
    151150#  else
    152   #error Dont know clock tick length
     151#error Dont know clock tick length
    153152#  endif
    154   if (times(&buffer) == (clock_t)-1) return -1.0;
    155   tarray[0] = (float) buffer.tms_utime / (float)clk_tck;
    156   tarray[1] = (float) buffer.tms_stime / (float)clk_tck;
     153  if (times (&buffer) == (clock_t) - 1)
     154    return -1.0;
     155  tarray[0] = (float) buffer.tms_utime / (float) clk_tck;
     156  tarray[1] = (float) buffer.tms_stime / (float) clk_tck;
    157157#endif /* HAVE_GETRUSAGE */
    158   return (tarray[0]+tarray[1]);
     158  return (tarray[0] + tarray[1]);
    159159#else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */
    160160  errno = ENOSYS;
  • branches/GNU/src/gcc/libf2c/libU77/fdate_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4444   essentially the same for both. */
    4545
    46 /* Character *24 */ void G77_fdate_0 (char *ret_val, ftnlen ret_val_len)
     46/* Character *24 */ void
     47G77_fdate_0 (char *ret_val, ftnlen ret_val_len)
    4748{
    48     int s_copy ();
    49     time_t tloc;
    50     tloc = time (NULL);
    51     /* Allow a length other than 24 for compatibility with what other
    52        systems do, despite it being documented as 24. */
    53     s_copy (ret_val, ctime ((time_t *) &tloc), ret_val_len, 24);
     49  int s_copy ();
     50  time_t tloc;
     51  tloc = time (NULL);
     52  /* Allow a length other than 24 for compatibility with what other
     53     systems do, despite it being documented as 24. */
     54  s_copy (ret_val, ctime ((time_t *) & tloc), ret_val_len, 24);
    5455}
  • branches/GNU/src/gcc/libf2c/libU77/fgetc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727#include "fio.h"
    2828
    29 #ifdef KR_headers
    30 integer G77_fgetc_0 (lunit, c, Lc)
    31      integer *lunit;
    32      ftnlen Lc;                 /* should be 1 */
    33      char *c;
    34 #else
    35 integer G77_fgetc_0 (const integer *lunit, char *c, ftnlen Lc)
    36 #endif
     29integer
     30G77_fgetc_0 (const integer * lunit, char *c, ftnlen Lc)
    3731{
    3832  int err;
    3933  FILE *f = f__units[*lunit].ufd;
    4034
    41   if (*lunit>=MXUNIT || *lunit<0)
     35  if (*lunit >= MXUNIT || *lunit < 0)
    4236    return 101;                 /* bad unit error */
    4337  err = getc (f);
    44   if (err == EOF) {
    45     if (feof (f))
    46       return -1;
    47     else
    48       return ferror (f); }
    49   else {
    50     if (Lc == 0)
     38  if (err == EOF)
     39    {
     40      if (feof (f))
     41        return -1;
     42      else
     43        return ferror (f);
     44    }
     45  else
     46    {
     47      if (Lc == 0)
     48        return 0;
     49
     50      c[0] = err;
     51      while (--Lc)
     52        *++c = ' ';
    5153      return 0;
    52 
    53     c[0] = err;
    54     while (--Lc)
    55       *++c = ' ';
    56     return 0; }
     54    }
    5755}
    5856
    59 #ifdef KR_headers
    60 integer G77_fget_0 (c, Lc)
    61      ftnlen Lc;                 /* should be 1 */
    62      char *c;
    63 #else
    64 integer G77_fget_0 (char *c, const ftnlen Lc)
    65 #endif
     57integer
     58G77_fget_0 (char *c, const ftnlen Lc)
    6659{
    6760  integer five = 5;
  • branches/GNU/src/gcc/libf2c/libU77/flush1_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2626/* This flushes a single unit, c.f. libI77 version. */
    2727
    28 #ifdef KR_headers
    29 extern integer G77_fnum_0 ();
    30 
    31 /* Subroutine */ int G77_flush1_0 (lunit)
    32      integer *lunit;
    33 #else
    3428extern integer G77_fnum_0 (integer *);
    3529
    36 /* Subroutine */ int G77_flush1_0 (const integer *lunit)
    37 #endif
     30/* Subroutine */ int
     31G77_flush1_0 (const integer * lunit)
    3832{
    39   if (*lunit>=MXUNIT || *lunit<0)
    40     err(1,101,"flush");
     33  if (*lunit >= MXUNIT || *lunit < 0)
     34    err (1, 101, "flush");
    4135  /* f__units is a table of descriptions for the unit numbers (defined
    4236     in io.h) with file descriptors rather than streams */
    4337  if (f__units[*lunit].ufd != NULL && f__units[*lunit].uwrt)
    44     fflush(f__units[*lunit].ufd);
     38    fflush (f__units[*lunit].ufd);
    4539  return 0;
    4640}
  • branches/GNU/src/gcc/libf2c/libU77/fnum_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2323#include "fio.h"
    2424
    25 #ifdef KR_headers
    26 integer G77_fnum_0 (lunit)
    27      integer *lunit;
    28 #else
    29 integer G77_fnum_0 (integer *lunit)
    30 #endif
     25integer
     26G77_fnum_0 (integer * lunit)
    3127{
    32   if (*lunit>=MXUNIT || *lunit<0)
    33     err(1,101,"fnum");
     28  if (*lunit >= MXUNIT || *lunit < 0)
     29    err (1, 101, "fnum");
    3430  /* f__units is a table of descriptions for the unit numbers (defined
    3531     in io.h).  Use file descriptor (ufd) and fileno rather than udev
    3632     field since udev is unix specific */
    37   return fileno(f__units[*lunit].ufd);
     33  return fileno (f__units[*lunit].ufd);
    3834}
  • branches/GNU/src/gcc/libf2c/libU77/fputc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727#include "fio.h"
    2828
    29 #ifdef KR_headers
    30 integer G77_fputc_0 (lunit, c, Lc)
    31      integer *lunit;
    32      ftnlen Lc;                 /* should be 1 */
    33      char *c;
    34 #else
    35 integer G77_fputc_0 (const integer *lunit, const char *c, const ftnlen Lc)
    36 #endif
     29integer
     30G77_fputc_0 (const integer * lunit, const char *c,
     31             const ftnlen Lc __attribute__ ((__unused__)))
    3732{
    3833  int err;
    3934  FILE *f = f__units[*lunit].ufd;
    4035
    41   if (*lunit>=MXUNIT || *lunit<0)
     36  if (*lunit >= MXUNIT || *lunit < 0)
    4237    return 101;                 /* bad unit error */
    4338  err = putc (c[0], f);
    44   if (err == EOF) {
    45     if (feof (f))
    46       return -1;
    47     else
    48       return ferror (f);
    49   }
     39  if (err == EOF)
     40    {
     41      if (feof (f))
     42        return -1;
     43      else
     44        return ferror (f);
     45    }
    5046  else
    5147    return 0;
    5248}
    5349
    54 #ifdef KR_headers
    55 integer G77_fput_0 (c, Lc)
    56      ftnlen Lc;                 /* should be 1 */
    57      char *c;
    58 #else
    59 integer G77_fput_0 (const char *c, const ftnlen Lc)
    60 #endif
     50integer
     51G77_fput_0 (const char *c, const ftnlen Lc)
    6152{
    6253  integer six = 6;
  • branches/GNU/src/gcc/libf2c/libU77/fstat_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727#include <sys/stat.h>
    2828
    29 #ifdef KR_headers
    30 extern integer G77_fnum_0 ();
    31 
    32 integer G77_fstat_0 (lunit, statb)
    33      integer *lunit;
    34      integer statb[13];
    35 #else
    3629extern integer G77_fnum_0 (const integer *);
    3730
    38 integer G77_fstat_0 (const integer *lunit, integer statb[13])
    39 #endif
     31integer
     32G77_fstat_0 (const integer * lunit, integer statb[13])
    4033{
    4134  int err;
  • branches/GNU/src/gcc/libf2c/libU77/gerror_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3030
    3131#ifndef HAVE_STRERROR
    32      extern char *sys_errlist [];
     32extern char *sys_errlist[];
    3333#    define strerror(i) (sys_errlist[i])
    3434#endif
    35 #ifdef KR_headers
    36 extern void s_copy ();
    37 /* Subroutine */ int G77_gerror_0 (str, Lstr)
    38      char *str; ftnlen Lstr;
    39 #else
    40 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    41 /* Subroutine */ int G77_gerror_0 (char *str, ftnlen Lstr)
    42 #endif
     35extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     36/* Subroutine */ int
     37G77_gerror_0 (char *str, ftnlen Lstr)
    4338{
    44   char * s;
     39  char *s;
    4540
    46   s = strerror(errno);
     41  s = strerror (errno);
    4742  s_copy (str, s, Lstr, strlen (s));
    4843  return 0;
  • branches/GNU/src/gcc/libf2c/libU77/getcwd_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3535#  include <unistd.h>
    3636#else
    37   extern char *getcwd ();
     37extern char *getcwd ();
    3838#endif
    3939
    40 #ifdef KR_headers
    41 extern void s_copy ();
    42 integer G77_getcwd_0 (str, Lstr)
    43      char *str; ftnlen Lstr;
    44 #else
    45 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    46 integer G77_getcwd_0 (char *str, const ftnlen Lstr)
    47 #endif
     40extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     41integer
     42G77_getcwd_0 (char *str, const ftnlen Lstr)
    4843{
    49     int i;
    50     char *ret;
     44  int i;
     45  char *ret;
    5146
    52     ret = getcwd (str, Lstr);
    53     if (ret == NULL) return errno;
    54     for (i=strlen(str); i<Lstr; i++)
    55         str[i] = ' ';
    56     return 0;
     47  ret = getcwd (str, Lstr);
     48  if (ret == NULL)
     49    return errno;
     50  for (i = strlen (str); i < Lstr; i++)
     51    str[i] = ' ';
     52  return 0;
    5753}
    5854
     
    6258
    6359#  include <sys/param.h>
    64   extern char *getwd ();
    65 #ifdef KR_headers
    66 extern VOID s_copy ();
    67 integer G77_getcwd_0 (str, Lstr)
    68      char *str; ftnlen Lstr;
    69 #else
    70 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    71 integer G77_getcwd_0 (char *str, const ftnlen Lstr)
    72 #endif
     60extern char *getwd ();
     61extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     62integer
     63G77_getcwd_0 (char *str, const ftnlen Lstr)
    7364{
    7465  char pathname[MAXPATHLEN];
    7566  size_t l;
    7667
    77   if (getwd (pathname) == NULL) {
    78     return errno;
    79   } else {
    80     s_copy (str, pathname, Lstr, strlen (str));
    81     return 0;
    82   }
     68  if (getwd (pathname) == NULL)
     69    {
     70      return errno;
     71    }
     72  else
     73    {
     74      s_copy (str, pathname, Lstr, strlen (str));
     75      return 0;
     76    }
    8377}
    8478
    85 #else  /* !HAVE_GETWD && !HAVE_GETCWD */
     79#else /* !HAVE_GETWD && !HAVE_GETCWD */
    8680
    87 #ifdef KR_headers
    88 extern VOID s_copy ();
    89 integer G77_getcwd_0 (str, Lstr)
    90      char *str; ftnlen Lstr;
    91 #else
    92 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    93 integer G77_getcwd_0 (char *str, const ftnlen Lstr)
    94 #endif
     81extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     82integer
     83G77_getcwd_0 (char *str, const ftnlen Lstr)
    9584{
    9685  return errno = ENOSYS;
  • branches/GNU/src/gcc/libf2c/libU77/getgid_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727#include "f2c.h"
    2828
    29 #ifdef KR_headers
    30 integer G77_getgid_0 ()
    31 #else
    32 integer G77_getgid_0 (void)
    33 #endif
     29integer
     30G77_getgid_0 (void)
    3431{
    3532#if defined (HAVE_GETGID)
  • branches/GNU/src/gcc/libf2c/libU77/getlog_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4242/* SGI also has character*(*) function getlog() */
    4343
    44 #ifdef KR_headers
    45 extern VOID s_copy ();
    46 /* Subroutine */ int G77_getlog_0 (str, Lstr)
    47      char *str; ftnlen Lstr;
    48 #else
    49 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    50 /* Subroutine */ int G77_getlog_0 (char *str, const ftnlen Lstr)
    51 #endif
     44extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     45/* Subroutine */ int
     46G77_getlog_0 (char *str, const ftnlen Lstr)
    5247{
    5348  size_t i;
     
    5752#if defined (HAVE_GETLOGIN)
    5853  p = getlogin ();
    59   if (p != NULL) {
    60     i = strlen (p);
    61     s_copy (str, p, Lstr, i);
    62   } else {
    63     s_copy (str, " ", Lstr, 1);
    64   }
     54  if (p != NULL)
     55    {
     56      i = strlen (p);
     57      s_copy (str, p, Lstr, i);
     58    }
     59  else
     60    {
     61      s_copy (str, " ", Lstr, 1);
     62    }
    6563  status = 0;
    6664#else
  • branches/GNU/src/gcc/libf2c/libU77/getpid_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2626#include "f2c.h"
    2727
    28 #ifdef KR_headers
    29 integer G77_getpid_0 ()
    30 #else
    31 integer G77_getpid_0 (void)
    32 #endif
     28integer
     29G77_getpid_0 (void)
    3330{
    3431  return getpid ();
  • branches/GNU/src/gcc/libf2c/libU77/getuid_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727#include "f2c.h"
    2828
    29 #ifdef KR_headers
    30 integer G77_getuid_0 ()
    31 #else
    32 integer G77_getuid_0 (void)
    33 #endif
     29integer
     30G77_getuid_0 (void)
    3431{
    3532#if defined (HAVE_GETUID)
  • branches/GNU/src/gcc/libf2c/libU77/gmtime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#include "f2c.h"
    3535
    36 #ifdef KR_headers
    37 /* Subroutine */ int G77_gmtime_0 (xstime, tarray)
    38      integer *xstime, tarray[9];
    39 #else
    40 /* Subroutine */ int G77_gmtime_0 (const integer * xstime, integer tarray[9])
    41 #endif
     36/* Subroutine */ int
     37G77_gmtime_0 (const integer * xstime, integer tarray[9])
    4238{
    4339  struct tm *lt;
  • branches/GNU/src/gcc/libf2c/libU77/hostnm_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3131#include "f2c.h"
    3232
    33 integer G77_hostnm_0 (char *name, ftnlen Lname)
     33integer
     34G77_hostnm_0 (char *name, ftnlen Lname)
    3435{
    35     int ret, i;
     36  int ret, i;
    3637
    3738#if HAVE_GETHOSTNAME
    38     ret = gethostname (name, Lname);
    39     if (ret==0) {
    40         /* Pad with blanks (assuming gethostname will make an error
    41            return if it can't fit in the null). */
    42         for (i=strlen(name); i<Lname; i++)
    43             name[i] = ' ';
     39  ret = gethostname (name, Lname);
     40  if (ret == 0)
     41    {
     42      /* Pad with blanks (assuming gethostname will make an error
     43         return if it can't fit in the null). */
     44      for (i = strlen (name); i < Lname; i++)
     45        name[i] = ' ';
    4446    }
    45     return ret;
     47  return ret;
    4648#else
    47     return errno = ENOSYS;
     49  return errno = ENOSYS;
    4850#endif
    4951}
  • branches/GNU/src/gcc/libf2c/libU77/idate_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3838/* libU77 one: */
    3939
    40 #ifdef KR_headers
    41 /* Subroutine */ int G77_idate_0 (iarray)
    42      int iarray[3];
    43 #else
    44 /* Subroutine */ int G77_idate_0 (int iarray[3])
    45 #endif
     40/* Subroutine */ int
     41G77_idate_0 (int iarray[3])
    4642{
    4743  struct tm *lt;
    4844  time_t tim;
    49   tim = time(NULL);
    50   lt = localtime(&tim);
     45  tim = time (NULL);
     46  lt = localtime (&tim);
    5147  iarray[0] = lt->tm_mday;
    5248  iarray[1] = lt->tm_mon + 1;   /* in range 1-12 in SunOS (experimentally) */
  • branches/GNU/src/gcc/libf2c/libU77/ierrno_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2323#include "f2c.h"
    2424
    25 #ifdef KR_headers
    26 integer G77_ierrno_0 ()
    27 #else
    28 integer G77_ierrno_0 (void)
    29 #endif
     25integer
     26G77_ierrno_0 (void)
    3027{
    3128  return errno;
  • branches/GNU/src/gcc/libf2c/libU77/irand_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3232/* Note this is per SunOS -- other s may have no arg. */
    3333
    34 #ifdef KR_headers
    35 integer G77_irand_0 (flag)
    36   integer *flag;
    37 #else
    38 integer G77_irand_0 (integer *flag)
    39 #endif
     34integer
     35G77_irand_0 (integer * flag)
    4036{
    41   switch (*flag) {
    42   case 0:
    43     break;
    44   case 1:
    45     srand (0);                  /* Arbitrary choice of initialiser. */
    46     break;
    47   default:
    48     srand (*flag);
    49   }
     37  switch (*flag)
     38    {
     39    case 0:
     40      break;
     41    case 1:
     42      srand (0);                /* Arbitrary choice of initialiser. */
     43      break;
     44    default:
     45      srand (*flag);
     46    }
    5047  return rand ();
    5148}
    52 
    53 
    54 
    55 
    56 
    57 
  • branches/GNU/src/gcc/libf2c/libU77/isatty_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2626#include "fio.h"
    2727
    28 #ifdef KR_headers
    29 extern integer G77_fnum_0 ();
    30 
    31 logical G77_isatty_0 (lunit)
    32      integer *lunit;
    33 #else
    3428extern integer G77_fnum_0 (integer *);
    3529
    36 logical G77_isatty_0 (integer *lunit)
    37 #endif
     30logical
     31G77_isatty_0 (integer * lunit)
    3832{
    39   if (*lunit>=MXUNIT || *lunit<0)
    40     err(1,101,"isatty");
     33  if (*lunit >= MXUNIT || *lunit < 0)
     34    err (1, 101, "isatty");
    4135  /* f__units is a table of descriptions for the unit numbers (defined
    4236     in io.h) with file descriptors rather than streams */
    43   return (isatty(G77_fnum_0 (lunit)) ? TRUE_ : FALSE_);
     37  return (isatty (G77_fnum_0 (lunit)) ? TRUE_ : FALSE_);
    4438}
  • branches/GNU/src/gcc/libf2c/libU77/itime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#include "f2c.h"
    3535
    36 #ifdef KR_headers
    37 /* Subroutine */ int G77_itime_0 (tarray)
    38      integer tarray[3];
    39 #else
    40 /* Subroutine */ int G77_itime_0 (integer tarray[3])
    41 #endif
     36/* Subroutine */ int
     37G77_itime_0 (integer tarray[3])
    4238{
    4339  struct tm *lt;
    4440  time_t tim;
    4541
    46   tim = time(NULL);
    47   lt = localtime(&tim);
     42  tim = time (NULL);
     43  lt = localtime (&tim);
    4844  tarray[0] = lt->tm_hour;
    4945  tarray[1] = lt->tm_min;
  • branches/GNU/src/gcc/libf2c/libU77/kill_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2727/* fixme: bsd, svr1-3 use int, not pid_t */
    2828
    29 #ifdef KR_headers
    30 integer G77_kill_0 (pid, signum)
    31      integer *pid, *signum;
    32 #else
    33 integer G77_kill_0 (const integer *pid, const integer *signum)
    34 #endif
     29integer
     30G77_kill_0 (const integer * pid, const integer * signum)
    3531{
    3632#if defined (HAVE_KILL)
    37   return kill ((pid_t) *pid, *signum) ? errno : 0;
     33  return kill ((pid_t) * pid, *signum) ? errno : 0;
    3834#else
    3935  errno = ENOSYS;
  • branches/GNU/src/gcc/libf2c/libU77/link_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3535#include "f2c.h"
    3636
    37 #ifdef KR_headers
    38 void g_char ();
     37void g_char (const char *a, ftnlen alen, char *b);
    3938
    40 integer G77_link_0 (path1, path2, Lpath1, Lpath2)
    41      char *path1, *path2; ftnlen Lpath1, Lpath2;
    42 #else
    43 void g_char(const char *a, ftnlen alen, char *b);
    44 
    45 integer G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
    46 #endif
     39integer
     40G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1,
     41            const ftnlen Lpath2)
    4742{
    4843#if defined (HAVE_LINK)
    4944  char *buff1, *buff2;
    50   char *bp, *blast;
    5145  int i;
    5246
    53   buff1 = malloc (Lpath1+1);
    54   if (buff1 == NULL) return -1;
     47  buff1 = malloc (Lpath1 + 1);
     48  if (buff1 == NULL)
     49    return -1;
    5550  g_char (path1, Lpath1, buff1);
    56   buff2 = malloc (Lpath2+1);
    57   if (buff2 == NULL) return -1;
     51  buff2 = malloc (Lpath2 + 1);
     52  if (buff2 == NULL)
     53    return -1;
    5854  g_char (path2, Lpath2, buff2);
    5955  i = link (buff1, buff2);
    60   free (buff1); free (buff2);
     56  free (buff1);
     57  free (buff2);
    6158  return i ? errno : 0;
    6259#else /* ! HAVE_LINK */
  • branches/GNU/src/gcc/libf2c/libU77/lnblnk_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2222#include "f2c.h"
    2323
    24 integer G77_lnblnk_0 (char *str, ftnlen str_len)
     24integer
     25G77_lnblnk_0 (char *str, ftnlen str_len)
    2526{
    26     integer ret_val;
    27     integer i_len();
     27  integer ret_val;
     28  integer i_len ();
    2829
    29     for (ret_val = str_len; ret_val >= 1; --ret_val) {
    30         if (*(unsigned char *)&str[ret_val - 1] != ' ') {
    31             return ret_val;
     30  for (ret_val = str_len; ret_val >= 1; --ret_val)
     31    {
     32      if (*(unsigned char *) &str[ret_val - 1] != ' ')
     33        {
     34          return ret_val;
    3235        }
    3336    }
    34     return ret_val;
     37  return ret_val;
    3538}
  • branches/GNU/src/gcc/libf2c/libU77/lstat_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3131/* lstat isn't posix */
    3232
    33 #ifdef KR_headers
    34 void g_char();
     33void g_char (const char *a, ftnlen alen, char *b);
    3534
    36 integer G77_lstat_0 (name, statb, Lname)
    37      char *name;
    38      integer statb[13];
    39      ftnlen Lname;
    40 #else
    41 void g_char(const char *a, ftnlen alen, char *b);
    42 
    43 integer G77_lstat_0 (const char *name, integer statb[13], const ftnlen Lname)
    44 #endif
     35integer
     36G77_lstat_0 (const char *name, integer statb[13], const ftnlen Lname)
    4537{
    4638#if HAVE_LSTAT
    4739  char *buff;
    48   char *bp, *blast;
    4940  int err;
    5041  struct stat buf;
    5142
    52   buff = malloc (Lname+1);
    53   if (buff == NULL) return -1;
     43  buff = malloc (Lname + 1);
     44  if (buff == NULL)
     45    return -1;
    5446  g_char (name, Lname, buff);
    5547  err = lstat (buff, &buf);
     
    8173#endif
    8274  return err;
    83 #else   /* !HAVE_LSTAT */
     75#else /* !HAVE_LSTAT */
    8476  return errno = ENOSYS;
    85 #endif  /* !HAVE_LSTAT */
     77#endif /* !HAVE_LSTAT */
    8678}
  • branches/GNU/src/gcc/libf2c/libU77/ltime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#include "f2c.h"
    3535
    36 #ifdef KR_headers
    37 /* Subroutine */ int G77_ltime_0 (xstime, tarray)
    38      integer *xstime, tarray[9];
    39 #else
    40 /* Subroutine */ int G77_ltime_0 (const integer * xstime, integer tarray[9])
    41 #endif
     36/* Subroutine */ int
     37G77_ltime_0 (const integer * xstime, integer tarray[9])
    4238{
    4339  struct tm *lt;
  • branches/GNU/src/gcc/libf2c/libU77/mclock_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434/* Reported by wd42ej@sgi83.wwb.noaa.gov (Russ Jones AUTO-Sun3) on AIX. */
    3535
    36 #ifdef KR_headers
    37 longint G77_mclock_0 ()
    38 #else
    39 longint G77_mclock_0 (void)
    40 #endif
     36longint
     37G77_mclock_0 (void)
    4138{
    4239#if HAVE_CLOCK
  • branches/GNU/src/gcc/libf2c/libU77/perror_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2929#include "f2c.h"
    3030
    31 #ifdef KR_headers
    32 /* Subroutine */ int G77_perror_0 (str, Lstr)
    33      char *str; ftnlen Lstr;
    34 #else
    35 /* Subroutine */ int G77_perror_0 (const char *str, const ftnlen Lstr)
    36 #endif
     31/* Subroutine */ int
     32G77_perror_0 (const char *str, const ftnlen Lstr)
    3733{
    3834  char buff[1000];
     
    4137  /* same technique as `system' -- what's wrong with malloc? */
    4238  blast = buff + (Lstr < 1000 ? Lstr : 1000);
    43   for (bp = buff ; bp<blast && *str!='\0' ; )
     39  for (bp = buff; bp < blast && *str != '\0';)
    4440    *bp++ = *str++;
    4541  *bp = '\0';
  • branches/GNU/src/gcc/libf2c/libU77/rand_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3535/* Note this is per SunOS -- other s may have no arg. */
    3636
    37 #ifdef KR_headers
    38 double G77_rand_0 (flag)
    39   integer *flag;
    40 #else
    41 double G77_rand_0 (integer *flag)
    42 #endif
     37double
     38G77_rand_0 (integer * flag)
    4339{
    44   switch (*flag) {
    45   case 0:
    46     break;
    47   case 1:
    48     srand (0);                  /* Arbitrary choice of initialiser. */
    49     break;
    50   default:
    51     srand (*flag);
    52   }
     40  switch (*flag)
     41    {
     42    case 0:
     43      break;
     44    case 1:
     45      srand (0);                /* Arbitrary choice of initialiser. */
     46      break;
     47    default:
     48      srand (*flag);
     49    }
    5350  return (float) rand () / RAND_MAX;
    5451}
  • branches/GNU/src/gcc/libf2c/libU77/rename_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3030#include "f2c.h"
    3131
    32 #ifdef KR_headers
    33 void g_char ();
     32void g_char (const char *a, ftnlen alen, char *b);
    3433
    35 integer G77_rename_0 (path1, path2, Lpath1, Lpath2)
    36      char *path1, *path2; ftnlen Lpath1, Lpath2;
    37 #else
    38 void g_char(const char *a, ftnlen alen, char *b);
    39 
    40 integer G77_rename_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
    41 #endif
     34integer
     35G77_rename_0 (const char *path1, const char *path2, const ftnlen Lpath1,
     36              const ftnlen Lpath2)
    4237{
    4338  char *buff1, *buff2;
    44   char *bp, *blast;
    4539  int i;
    4640
    47   buff1 = malloc (Lpath1+1);
    48   if (buff1 == NULL) return -1;
     41  buff1 = malloc (Lpath1 + 1);
     42  if (buff1 == NULL)
     43    return -1;
    4944  g_char (path1, Lpath1, buff1);
    50   buff2 = malloc (Lpath2+1);
    51   if (buff2 == NULL) return -1;
     45  buff2 = malloc (Lpath2 + 1);
     46  if (buff2 == NULL)
     47    return -1;
    5248  g_char (path2, Lpath2, buff2);
    5349  i = rename (buff1, buff2);
    54   free (buff1); free (buff2);
     50  free (buff1);
     51  free (buff2);
    5552  return i ? errno : 0;
    5653}
  • branches/GNU/src/gcc/libf2c/libU77/secnds_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3737/* This is a VMS intrinsic. */
    3838
    39 double G77_secnds_0 (real *r)
     39double
     40G77_secnds_0 (real * r)
    4041{
    41     struct tm *lt;
    42     time_t clock;
    43     float f;
     42  struct tm *lt;
     43  time_t clock;
     44  float f;
    4445
    45     clock = time (NULL);
    46     lt = localtime (&clock);
    47     f= (3600.0*((real)lt->tm_hour) + 60.0*((real)lt->tm_min) +
    48             (real)lt->tm_sec - *r);
    49     return f;
     46  clock = time (NULL);
     47  lt = localtime (&clock);
     48  f = (3600.0 * ((real) lt->tm_hour) + 60.0 * ((real) lt->tm_min) +
     49       (real) lt->tm_sec - *r);
     50  return f;
    5051}
    51 
  • branches/GNU/src/gcc/libf2c/libU77/second_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1919#include "f2c.h"
    2020
    21 double G77_second_0 () {
     21double
     22G77_second_0 ()
     23{
    2224  extern double G77_etime_0 ();
    2325  real tarray[2];
  • branches/GNU/src/gcc/libf2c/libU77/sleep_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2626
    2727/* Subroutine */
    28 #ifdef KR_headers
    29 int G77_sleep_0 (seconds)
    30      integer *seconds;
    31 #else
    32 int G77_sleep_0 (const integer *seconds)
    33 #endif
     28int
     29G77_sleep_0 (const integer * seconds)
    3430{
    3531  (void) sleep ((unsigned int) *seconds);
  • branches/GNU/src/gcc/libf2c/libU77/srand_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2525#include "f2c.h"
    2626
    27 /* Subroutine */
    28 #ifdef KR_headers
    29 int G77_srand_0 (seed)
    30      integer *seed;
    31 #else
    32 int G77_srand_0 (const integer *seed)
    33 #endif
     27/* Subroutine */
     28int
     29G77_srand_0 (const integer * seed)
    3430{
    3531  srand ((unsigned int) *seed);
  • branches/GNU/src/gcc/libf2c/libU77/stat_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2828#include "f2c.h"
    2929
    30 #ifdef KR_headers
    31 void g_char ();
     30void g_char (const char *a, ftnlen alen, char *b);
    3231
    33 integer G77_stat_0 (name, statb, Lname)
    34      char *name;
    35      integer statb[13];
    36      ftnlen Lname;
    37 #else
    38 void g_char(const char *a, ftnlen alen, char *b);
    39 
    40 integer G77_stat_0 (const char *name, integer statb[13], const ftnlen Lname)
    41 #endif
     32integer
     33G77_stat_0 (const char *name, integer statb[13], const ftnlen Lname)
    4234{
    4335  char *buff;
    44   char *bp, *blast;
    4536  int err;
    4637  struct stat buf;
    4738
    48   buff = malloc (Lname+1);
    49   if (buff == NULL) return -1;
     39  buff = malloc (Lname + 1);
     40  if (buff == NULL)
     41    return -1;
    5042  g_char (name, Lname, buff);
    5143  err = stat (buff, &buf);
  • branches/GNU/src/gcc/libf2c/libU77/symlnk_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#include "f2c.h"
    3535
    36 #ifdef KR_headers
    37 void g_char ();
     36void g_char (const char *a, ftnlen alen, char *b);
    3837
    39 integer G77_symlnk_0 (path1, path2, Lpath1, Lpath2)
    40      char *path1, *path2; ftnlen Lpath1, Lpath2;
    41 #else
    42 void g_char(const char *a, ftnlen alen, char *b);
    43 
    44 integer G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
    45 #endif
     38integer
     39G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1,
     40              const ftnlen Lpath2)
    4641{
    4742#if HAVE_SYMLINK
    4843  char *buff1, *buff2;
    49   char *bp, *blast;
    5044  int i;
    5145
    52   buff1 = (char *) malloc (Lpath1+1);
    53   if (buff1 == NULL) return -1;
     46  buff1 = (char *) malloc (Lpath1 + 1);
     47  if (buff1 == NULL)
     48    return -1;
    5449  g_char (path1, Lpath1, buff1);
    55   buff2 = (char *) malloc (Lpath2+1);
    56   if (buff2 == NULL) return -1;
     50  buff2 = (char *) malloc (Lpath2 + 1);
     51  if (buff2 == NULL)
     52    return -1;
    5753  g_char (path2, Lpath2, buff2);
    5854  i = symlink (buff1, buff2);
    59   free (buff1); free (buff2);
     55  free (buff1);
     56  free (buff2);
    6057  return i ? errno : 0;
    61 #else   /* !HAVE_SYMLINK */
     58#else /* !HAVE_SYMLINK */
    6259  return errno = ENOSYS;
    63 #endif  /* !HAVE_SYMLINK */
     60#endif /* !HAVE_SYMLINK */
    6461}
  • branches/GNU/src/gcc/libf2c/libU77/sys_clock_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4444#include "f2c.h"
    4545
    46 #ifdef KR_headers
    47 int G77_system_clock_0 (count, count_rate, count_max)
    48      integer *count, *count_rate, *count_max;
    49 #else
    50 int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max)
    51 #endif
     46int
     47G77_system_clock_0 (integer * count, integer * count_rate,
     48                    integer * count_max)
    5249{
    5350#if defined (HAVE_TIMES)
    5451  struct tms buffer;
    5552  unsigned long cnt;
    56   if (count_rate) {
     53  if (count_rate)
     54    {
    5755#ifdef _SC_CLK_TCK
    58     *count_rate = sysconf(_SC_CLK_TCK);
     56      *count_rate = sysconf (_SC_CLK_TCK);
    5957#elif defined CLOCKS_PER_SECOND
    60     *count_rate = CLOCKS_PER_SECOND;
     58      *count_rate = CLOCKS_PER_SECOND;
    6159#elif defined CLK_TCK
    62     *count_rate = CLK_TCK;
     60      *count_rate = CLK_TCK;
    6361#elif defined HZ
    64     *count_rate = HZ;
     62      *count_rate = HZ;
    6563#else
    6664#error Dont know clock tick length
    6765#endif
    68   }
     66    }
    6967  if (count_max)                /* optional arg present? */
    70     *count_max = INT_MAX;               /* dubious */
     68    *count_max = INT_MAX;       /* dubious */
    7169  cnt = times (&buffer);
    7270  if (cnt > (unsigned long) (INT_MAX))
  • branches/GNU/src/gcc/libf2c/libU77/time_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3636   subroutine which fills a character argument (which is the VMS way)
    3737   -- caveat emptor. */
    38 #ifdef KR_headers
    39 longint G77_time_0 ()
    40 #else
    41 longint G77_time_0 (void)
    42 #endif
     38longint
     39G77_time_0 (void)
    4340{
    4441  /* There are potential problems with the cast of the time_t here. */
  • branches/GNU/src/gcc/libf2c/libU77/ttynam_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3636#include "f2c.h"
    3737
    38 #ifdef KR_headers
    39 extern void s_copy ();
    40 extern integer G77_fnum_0 ();
    41 /* Character */ void G77_ttynam_0 (ret_val, ret_val_len, lunit)
    42      char *ret_val; ftnlen ret_val_len; integer *lunit
    43 #else
    44 extern integer G77_fnum_0 (integer *lunit);
    45 extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
    46 /* Character */ void G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer *lunit)
    47 #endif
     38extern integer G77_fnum_0 (integer * lunit);
     39extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb);
     40/* Character */ void
     41G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer * lunit)
    4842{
    4943#if defined (HAVE_TTYNAME)
     
    5246
    5347  p = ttyname (G77_fnum_0 (lunit));
    54   if (p != NULL) {
    55     i = strlen (p);
    56     s_copy (ret_val, p, ret_val_len, i);
    57   } else {
    58     s_copy (ret_val, " ", ret_val_len, 1);
    59   }
     48  if (p != NULL)
     49    {
     50      i = strlen (p);
     51      s_copy (ret_val, p, ret_val_len, i);
     52    }
     53  else
     54    {
     55      s_copy (ret_val, " ", ret_val_len, 1);
     56    }
    6057#else
    6158  errno = ENOSYS;
  • branches/GNU/src/gcc/libf2c/libU77/umask_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2424#include "f2c.h"
    2525
    26 #ifdef KR_headers
    27 integer G77_umask_0 (mask)
    28      integer *mask;
    29 #else
    30 integer G77_umask_0 (integer *mask)
    31 #endif
     26integer
     27G77_umask_0 (integer * mask)
    3228{
    33   return umask ((mode_t) *mask);
     29  return umask ((mode_t) * mask);
    3430}
  • branches/GNU/src/gcc/libf2c/libU77/unlink_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3434#include "f2c.h"
    3535
    36 #ifdef KR_headers
    37 void g_char ();
     36void g_char (const char *a, ftnlen alen, char *b);
    3837
    39 integer G77_unlink_0 (str, Lstr)
    40      char *str; ftnlen  Lstr;
    41 #else
    42 void g_char(const char *a, ftnlen alen, char *b);
    43 
    44 integer G77_unlink_0 (const char *str, const ftnlen Lstr)
    45 #endif
     38integer
     39G77_unlink_0 (const char *str, const ftnlen Lstr)
    4640{
    4741  char *buff;
    48   char *bp, *blast;
    4942  int i;
    5043
    51   buff = malloc (Lstr+1);
    52   if (buff == NULL) return -1;
     44  buff = malloc (Lstr + 1);
     45  if (buff == NULL)
     46    return -1;
    5347  g_char (str, Lstr, buff);
    5448  i = unlink (buff);
  • branches/GNU/src/gcc/libf2c/libU77/vxtidate_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    3939
    4040/* Subroutine */
    41 #ifdef KR_headers
    42 int G77_vxtidate_y2kbug_0 (m, d, y)
    43      integer *y, *m, *d;
    44 #else
    45 int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y)
    46 #endif
     41int
     42G77_vxtidate_y2kbug_0 (integer * m, integer * d, integer * y)
    4743{
    4844  struct tm *lt;
    4945  time_t tim;
    50   tim = time(NULL);
    51   lt = localtime(&tim);
     46  tim = time (NULL);
     47  lt = localtime (&tim);
    5248  *y = lt->tm_year % 100;
    53   *m = lt->tm_mon+1;
     49  *m = lt->tm_mon + 1;
    5450  *d = lt->tm_mday;
    5551  return 0;
     
    5854#ifdef PIC
    5955extern const char *G77_Non_Y2K_Compliance_Message;
    60 #  ifdef KR_headers
    61 int G77_vxtidate_y2kbuggy_0 (m, d, y)
    62      integer *y, *m, *d;
    63 #  else
    64 int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y)
    65 #  endif
     56int
     57G77_vxtidate_y2kbuggy_0 (integer * m __attribute__ ((__unused__)),
     58                         integer * d __attribute__ ((__unused__)),
     59                         integer * y __attribute__ ((__unused__)))
    6660{
    67   extern int G77_abort_0();
     61  extern int G77_abort_0 ();
    6862  fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
    69   G77_abort_0();
     63  G77_abort_0 ();
    7064}
    7165#endif
  • branches/GNU/src/gcc/libf2c/libU77/vxttime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4040
    4141/* Subroutine */
    42 #ifdef KR_headers
    43 void G77_vxttime_0 (chtime, Lchtime)
    44      char chtime[8];
    45      ftnlen Lchtime;
    46 #else
    47 void G77_vxttime_0 (char chtime[8], const ftnlen Lchtime)
    48 #endif
     42void
     43G77_vxttime_0 (char chtime[8],
     44               const ftnlen Lchtime __attribute__ ((__unused__)))
    4945{
    5046  time_t tim;
    5147  char *ctim;
    52   tim = time(NULL);
     48  tim = time (NULL);
    5349  ctim = ctime (&tim);
    54   strncpy (chtime, ctim+11, 8);
     50  strncpy (chtime, ctim + 11, 8);
    5551}
Note: See TracChangeset for help on using the changeset viewer.