Changeset 1391 for branches/GNU/src/gcc/libf2c/libU77
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (21 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libf2c/libU77/Makefile.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 38 38 @SET_MAKE@ 39 39 40 SHELL = /bin/sh40 SHELL = @SHELL@ 41 41 42 42 #### End of system configuration section. #### … … 44 44 # fio.h is in libI77. config.h is in `.'. 45 45 ALL_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) 47 47 48 48 # This could probably be done more elegantly, but it's currently -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/Version.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 } 1 const char __LIBU77_VERSION__[] = "@(#) LIBU77 VERSION 19980709\n"; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/access_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 46 46 #endif 47 47 48 #ifdef KR_headers 49 void g_char (); 48 void g_char (const char *a, ftnlen alen, char *b); 50 49 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 50 integer 51 G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode) 59 52 { 60 53 char *buff; 61 char *bp, *blast;62 54 int amode, i; 63 55 64 buff = malloc (Lname+1); 65 if (!buff) return -1; 56 buff = malloc (Lname + 1); 57 if (!buff) 58 return -1; 66 59 g_char (name, Lname, buff); 67 60 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 } 75 80 } 76 }77 81 i = access (buff, amode); 78 82 free (buff); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/alarm_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 30 30 #ifndef RETSIGTYPE 31 31 /* we shouldn't rely on this... */ 32 #ifdef KR_headers33 #define RETSIGTYPE int34 #else35 32 #define RETSIGTYPE void 36 33 #endif 37 #endif 38 typedef RETSIGTYPE (*sig_type)(); 34 typedef RETSIGTYPE (*sig_type) (); 39 35 40 #ifdef KR_headers41 extern sig_type signal();42 #else43 36 #include <signal.h> 44 typedef int (*sig_proc)(int); 45 #endif 37 typedef int (*sig_proc) (int); 46 38 47 39 #ifndef SIG_ERR … … 49 41 #endif 50 42 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 43 integer 44 G77_alarm_0 (integer * seconds, sig_proc proc) 58 45 { 59 46 int status; 60 47 #if defined (HAVE_ALARM) && defined (SIGALRM) 61 if (signal (SIGALRM, (sig_type)proc) == SIG_ERR)48 if (signal (SIGALRM, (sig_type) proc) == SIG_ERR) 62 49 status = -1; 63 50 else -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/bes.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 17 17 Boston, MA 02111-1307, USA. */ 18 18 19 #if 0 19 #if 0 /* Don't include these unless necessary -- jcb. */ 20 20 #include "f2c.h" 21 21 #include <math.h> 22 22 23 double G77_besj0_0 (const real *x) { 24 return j0 (*x); 23 double 24 G77_besj0_0 (const real * x) 25 { 26 return j0 (*x); 25 27 } 26 28 27 double G77_besj1_0 (const real *x) { 28 return j1 (*x); 29 double 30 G77_besj1_0 (const real * x) 31 { 32 return j1 (*x); 29 33 } 30 34 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); 35 double 36 G77_besjn_0 (const integer * n, real * x) 37 { 38 return jn (*n, *x); 37 39 } 38 40 39 double G77_besy1_0 (const real *x) { 40 return y1 (*x); 41 double 42 G77_besy0_0 (const real * x) 43 { 44 return y0 (*x); 41 45 } 42 46 43 double G77_besyn_0 (const integer *n, real *x) { 44 return yn (*n, *x); 47 double 48 G77_besy1_0 (const real * x) 49 { 50 return y1 (*x); 51 } 52 53 double 54 G77_besyn_0 (const integer * n, real * x) 55 { 56 return yn (*n, *x); 45 57 } 46 58 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/chdir_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 33 33 34 34 35 #ifdef KR_headers 36 void g_char (); 35 void g_char (const char *a, ftnlen alen, char *b); 37 36 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 37 integer 38 G77_chdir_0 (const char *name, const ftnlen Lname) 46 39 { 47 40 char *buff; 48 char *bp, *blast;49 41 int i; 50 42 51 buff = malloc (Lname+1); 52 if (!buff) return -1; 43 buff = malloc (Lname + 1); 44 if (!buff) 45 return -1; 53 46 g_char (name, Lname, buff); 54 47 i = chdir (buff); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/chmod_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 42 42 #endif 43 43 44 #ifdef KR_headers 45 extern void s_cat ();46 void g_char ( );44 extern void s_cat (char *lp, char *rpp[], ftnlen rnp[], ftnlen * np, 45 ftnlen ll); 46 void g_char (const char *a, ftnlen alen, char *b); 47 47 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 48 integer 49 G77_chmod_0 ( /* const */ char *name, /* const */ char *mode, 50 const ftnlen Lname, const ftnlen Lmode) 57 51 { 58 52 char *buff; 59 char *bp, *blast;60 53 int i; 61 54 ftnlen l, l2; … … 63 56 address a[6]; 64 57 ftnlen ii[6]; 65 char chmod_path 58 char chmod_path[] = CHMOD_PATH; 66 59 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] == ' ');) 74 72 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'; 79 79 i = system (buff); 80 80 free (buff); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/config.hin
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #undef CHMOD_PATH 35 35 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 36 42 /* Define if you have the alarm function. */ 37 43 #undef HAVE_ALARM … … 54 60 /* Define if you have the getrusage function. */ 55 61 #undef HAVE_GETRUSAGE 62 63 /* Define if you have the gettimeofday function. */ 64 #undef HAVE_GETTIMEOFDAY 56 65 57 66 /* Define if you have the getuid function. */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/configure
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 29 29 silent= 30 30 site= 31 sitefile= 31 32 srcdir= 32 33 target=NONE … … 143 144 --no-create do not create output files 144 145 --quiet, --silent do not print \`checking...' messages 146 --site-file=FILE use FILE as the site file 145 147 --version print the version of autoconf that created configure 146 148 Directory and file names: … … 313 315 site="$ac_optarg" ;; 314 316 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 315 322 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 316 323 ac_prev=srcdir ;; … … 478 485 479 486 # 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" 487 if 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 485 494 fi 495 else 496 CONFIG_SITE="$sitefile" 486 497 fi 487 498 for ac_site_file in $CONFIG_SITE; do … … 524 535 525 536 526 # These defines are necessary to get 64-bit file size support.527 528 cat >> confdefs.h <<\EOF529 #define _XOPEN_SOURCE 500L530 EOF531 532 # The following is needed by irix6.2 so that struct timeval is declared.533 cat >> confdefs.h <<\EOF534 #define _XOPEN_SOURCE_EXTENDED 1535 EOF536 537 # The following is needed by Solaris2.5.1 so that struct timeval is declared.538 cat >> confdefs.h <<\EOF539 #define __EXTENSIONS__ 1540 EOF541 542 cat >> confdefs.h <<\EOF543 #define _FILE_OFFSET_BITS 64544 EOF545 546 547 548 537 549 538 … … 553 542 set dummy gcc; ac_word=$2 554 543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 555 echo "configure:5 56: checking for $ac_word" >&5544 echo "configure:545: checking for $ac_word" >&5 556 545 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 557 546 echo $ac_n "(cached) $ac_c" 1>&6 … … 583 572 set dummy cc; ac_word=$2 584 573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 585 echo "configure:5 86: checking for $ac_word" >&5574 echo "configure:575: checking for $ac_word" >&5 586 575 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 587 576 echo $ac_n "(cached) $ac_c" 1>&6 … … 634 623 set dummy cl; ac_word=$2 635 624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 636 echo "configure:6 37: checking for $ac_word" >&5625 echo "configure:626: checking for $ac_word" >&5 637 626 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 638 627 echo $ac_n "(cached) $ac_c" 1>&6 … … 667 656 668 657 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 669 echo "configure:6 70: checking whether we are using GNU C" >&5658 echo "configure:659: checking whether we are using GNU C" >&5 670 659 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 671 660 echo $ac_n "(cached) $ac_c" 1>&6 … … 676 665 #endif 677 666 EOF 678 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:6 79: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then667 if { 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 679 668 ac_cv_prog_gcc=yes 680 669 else … … 695 684 CFLAGS= 696 685 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 697 echo "configure:6 98: checking whether ${CC-cc} accepts -g" >&5686 echo "configure:687: checking whether ${CC-cc} accepts -g" >&5 698 687 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 699 688 echo $ac_n "(cached) $ac_c" 1>&6 … … 727 716 728 717 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. 721 echo $ac_n "checking whether _XOPEN_SOURCE may be defined""... $ac_c" 1>&6 722 echo "configure:723: checking whether _XOPEN_SOURCE may be defined" >&5 723 cat > conftest.$ac_ext <<EOF 724 #line 725 "configure" 725 #include "confdefs.h" 726 #define _XOPEN_SOURCE 600L 727 #include <unistd.h> 728 int main() { 729 730 ; return 0; } 731 EOF 732 if { (eval echo configure:733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 733 rm -rf conftest* 734 may_use_xopen_source=yes 735 else 736 echo "configure: failed program was:" >&5 737 cat conftest.$ac_ext >&5 738 rm -rf conftest* 739 may_use_xopen_source=no 740 fi 741 rm -f conftest* 742 echo "$ac_t""$may_use_xopen_source" 1>&6 743 if test $may_use_xopen_source = yes; then 744 cat >> confdefs.h <<\EOF 745 #define _XOPEN_SOURCE 600L 746 EOF 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 751 EOF 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 756 EOF 757 758 cat >> confdefs.h <<\EOF 759 #define _FILE_OFFSET_BITS 64 760 EOF 761 762 fi 763 764 729 765 LIBTOOL='$(SHELL) ../libtool' 730 766 … … 739 775 740 776 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 741 echo "configure:7 42: checking whether ${MAKE-make} sets \${MAKE}" >&5777 echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5 742 778 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 743 779 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then … … 769 805 set dummy chmod; ac_word=$2 770 806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 771 echo "configure: 772: checking for $ac_word" >&5807 echo "configure:808: checking for $ac_word" >&5 772 808 if eval "test \"`echo '$''{'ac_cv_path_ac_cv_prog_chmod'+set}'`\" = set"; then 773 809 echo $ac_n "(cached) $ac_c" 1>&6 … … 813 849 814 850 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 815 echo "configure:8 16: checking how to run the C preprocessor" >&5851 echo "configure:852: checking how to run the C preprocessor" >&5 816 852 # On Suns, sometimes $CPP names a directory. 817 853 if test -n "$CPP" && test -d "$CPP"; then … … 828 864 # not just through cpp. 829 865 cat > conftest.$ac_ext <<EOF 830 #line 8 31"configure"866 #line 867 "configure" 831 867 #include "confdefs.h" 832 868 #include <assert.h> … … 834 870 EOF 835 871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 836 { (eval echo configure:8 37: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }872 { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 837 873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 838 874 if test -z "$ac_err"; then … … 845 881 CPP="${CC-cc} -E -traditional-cpp" 846 882 cat > conftest.$ac_ext <<EOF 847 #line 8 48"configure"883 #line 884 "configure" 848 884 #include "confdefs.h" 849 885 #include <assert.h> … … 851 887 EOF 852 888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 853 { (eval echo configure:8 54: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }889 { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 854 890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 855 891 if test -z "$ac_err"; then … … 862 898 CPP="${CC-cc} -nologo -E" 863 899 cat > conftest.$ac_ext <<EOF 864 #line 865"configure"900 #line 901 "configure" 865 901 #include "confdefs.h" 866 902 #include <assert.h> … … 868 904 EOF 869 905 ac_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; } 871 907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 872 908 if test -z "$ac_err"; then … … 893 929 894 930 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 895 echo "configure: 896: checking for ANSI C header files" >&5931 echo "configure:932: checking for ANSI C header files" >&5 896 932 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 897 933 echo $ac_n "(cached) $ac_c" 1>&6 898 934 else 899 935 cat > conftest.$ac_ext <<EOF 900 #line 9 01"configure"936 #line 937 "configure" 901 937 #include "confdefs.h" 902 938 #include <stdlib.h> … … 906 942 EOF 907 943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 908 { (eval echo configure:9 09: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }944 { (eval echo configure:945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 909 945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 910 946 if test -z "$ac_err"; then … … 923 959 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 924 960 cat > conftest.$ac_ext <<EOF 925 #line 9 26"configure"961 #line 962 "configure" 926 962 #include "confdefs.h" 927 963 #include <string.h> … … 941 977 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 942 978 cat > conftest.$ac_ext <<EOF 943 #line 9 44"configure"979 #line 980 "configure" 944 980 #include "confdefs.h" 945 981 #include <stdlib.h> … … 962 998 else 963 999 cat > conftest.$ac_ext <<EOF 964 #line 965"configure"1000 #line 1001 "configure" 965 1001 #include "confdefs.h" 966 1002 #include <ctype.h> … … 973 1009 974 1010 EOF 975 if { (eval echo configure: 976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1011 if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 976 1012 then 977 1013 : … … 996 1032 fi 997 1033 998 999 1034 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 1000 echo "configure:10 01: checking whether time.h and sys/time.h may both be included" >&51035 echo "configure:1036: checking whether time.h and sys/time.h may both be included" >&5 1001 1036 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 1002 1037 echo $ac_n "(cached) $ac_c" 1>&6 1003 1038 else 1004 1039 cat > conftest.$ac_ext <<EOF 1005 #line 10 06"configure"1040 #line 1041 "configure" 1006 1041 #include "confdefs.h" 1007 1042 #include <sys/types.h> … … 1012 1047 ; return 0; } 1013 1048 EOF 1014 if { (eval echo configure:10 15: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1049 if { (eval echo configure:1050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1015 1050 rm -rf conftest* 1016 1051 ac_cv_header_time=yes … … 1037 1072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1038 1073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1039 echo "configure:10 40: checking for $ac_hdr" >&51074 echo "configure:1075: checking for $ac_hdr" >&5 1040 1075 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1041 1076 echo $ac_n "(cached) $ac_c" 1>&6 1042 1077 else 1043 1078 cat > conftest.$ac_ext <<EOF 1044 #line 10 45"configure"1079 #line 1080 "configure" 1045 1080 #include "confdefs.h" 1046 1081 #include <$ac_hdr> 1047 1082 EOF 1048 1083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1049 { (eval echo configure:10 50: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1084 { (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1050 1085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1051 1086 if test -z "$ac_err"; then … … 1075 1110 1076 1111 echo $ac_n "checking for working const""... $ac_c" 1>&6 1077 echo "configure:1 078: checking for working const" >&51112 echo "configure:1113: checking for working const" >&5 1078 1113 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then 1079 1114 echo $ac_n "(cached) $ac_c" 1>&6 1080 1115 else 1081 1116 cat > conftest.$ac_ext <<EOF 1082 #line 1 083"configure"1117 #line 1118 "configure" 1083 1118 #include "confdefs.h" 1084 1119 … … 1129 1164 ; return 0; } 1130 1165 EOF 1131 if { (eval echo configure:11 32: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1166 if { (eval echo configure:1167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1132 1167 rm -rf conftest* 1133 1168 ac_cv_c_const=yes … … 1150 1185 1151 1186 echo $ac_n "checking for size_t""... $ac_c" 1>&6 1152 echo "configure:11 53: checking for size_t" >&51187 echo "configure:1188: checking for size_t" >&5 1153 1188 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then 1154 1189 echo $ac_n "(cached) $ac_c" 1>&6 1155 1190 else 1156 1191 cat > conftest.$ac_ext <<EOF 1157 #line 11 58"configure"1192 #line 1193 "configure" 1158 1193 #include "confdefs.h" 1159 1194 #include <sys/types.h> … … 1183 1218 1184 1219 echo $ac_n "checking for mode_t""... $ac_c" 1>&6 1185 echo "configure:1 186: checking for mode_t" >&51220 echo "configure:1221: checking for mode_t" >&5 1186 1221 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then 1187 1222 echo $ac_n "(cached) $ac_c" 1>&6 1188 1223 else 1189 1224 cat > conftest.$ac_ext <<EOF 1190 #line 1 191"configure"1225 #line 1226 "configure" 1191 1226 #include "confdefs.h" 1192 1227 #include <sys/types.h> … … 1217 1252 1218 1253 echo $ac_n "checking for pid_t""... $ac_c" 1>&6 1219 echo "configure:12 20: checking for pid_t" >&51254 echo "configure:1255: checking for pid_t" >&5 1220 1255 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then 1221 1256 echo $ac_n "(cached) $ac_c" 1>&6 1222 1257 else 1223 1258 cat > conftest.$ac_ext <<EOF 1224 #line 12 25"configure"1259 #line 1260 "configure" 1225 1260 #include "confdefs.h" 1226 1261 #include <sys/types.h> … … 1250 1285 1251 1286 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 1252 echo "configure:12 53: checking for st_blksize in struct stat" >&51287 echo "configure:1288: checking for st_blksize in struct stat" >&5 1253 1288 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then 1254 1289 echo $ac_n "(cached) $ac_c" 1>&6 1255 1290 else 1256 1291 cat > conftest.$ac_ext <<EOF 1257 #line 12 58"configure"1292 #line 1293 "configure" 1258 1293 #include "confdefs.h" 1259 1294 #include <sys/types.h> … … 1263 1298 ; return 0; } 1264 1299 EOF 1265 if { (eval echo configure:1 266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1300 if { (eval echo configure:1301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1266 1301 rm -rf conftest* 1267 1302 ac_cv_struct_st_blksize=yes … … 1284 1319 1285 1320 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 1286 echo "configure:1 287: checking for st_blocks in struct stat" >&51321 echo "configure:1322: checking for st_blocks in struct stat" >&5 1287 1322 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then 1288 1323 echo $ac_n "(cached) $ac_c" 1>&6 1289 1324 else 1290 1325 cat > conftest.$ac_ext <<EOF 1291 #line 1 292"configure"1326 #line 1327 "configure" 1292 1327 #include "confdefs.h" 1293 1328 #include <sys/types.h> … … 1297 1332 ; return 0; } 1298 1333 EOF 1299 if { (eval echo configure:13 00: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1334 if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1300 1335 rm -rf conftest* 1301 1336 ac_cv_struct_st_blocks=yes … … 1320 1355 1321 1356 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 1322 echo "configure:13 23: checking for st_rdev in struct stat" >&51357 echo "configure:1358: checking for st_rdev in struct stat" >&5 1323 1358 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then 1324 1359 echo $ac_n "(cached) $ac_c" 1>&6 1325 1360 else 1326 1361 cat > conftest.$ac_ext <<EOF 1327 #line 13 28"configure"1362 #line 1363 "configure" 1328 1363 #include "confdefs.h" 1329 1364 #include <sys/types.h> … … 1333 1368 ; return 0; } 1334 1369 EOF 1335 if { (eval echo configure:13 36: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1370 if { (eval echo configure:1371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1336 1371 rm -rf conftest* 1337 1372 ac_cv_struct_st_rdev=yes … … 1354 1389 1355 1390 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 1356 echo "configure:13 57: checking whether struct tm is in sys/time.h or time.h" >&51391 echo "configure:1392: checking whether struct tm is in sys/time.h or time.h" >&5 1357 1392 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then 1358 1393 echo $ac_n "(cached) $ac_c" 1>&6 1359 1394 else 1360 1395 cat > conftest.$ac_ext <<EOF 1361 #line 13 62"configure"1396 #line 1397 "configure" 1362 1397 #include "confdefs.h" 1363 1398 #include <sys/types.h> … … 1367 1402 ; return 0; } 1368 1403 EOF 1369 if { (eval echo configure:1 370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1404 if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1370 1405 rm -rf conftest* 1371 1406 ac_cv_struct_tm=time.h … … 1389 1424 1390 1425 echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 1391 echo "configure:1 392: checking for gethostname in -lsocket" >&51426 echo "configure:1427: checking for gethostname in -lsocket" >&5 1392 1427 ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'` 1393 1428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1397 1432 LIBS="-lsocket $LIBS" 1398 1433 cat > conftest.$ac_ext <<EOF 1399 #line 14 00"configure"1434 #line 1435 "configure" 1400 1435 #include "confdefs.h" 1401 1436 /* Override any gcc2 internal prototype to avoid an error. */ … … 1408 1443 ; return 0; } 1409 1444 EOF 1410 if { (eval echo configure:14 11: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1445 if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1411 1446 rm -rf conftest* 1412 1447 eval "ac_cv_lib_$ac_lib_var=yes" … … 1434 1469 do 1435 1470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1436 echo "configure:14 37: checking for $ac_func" >&51471 echo "configure:1472: checking for $ac_func" >&5 1437 1472 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1438 1473 echo $ac_n "(cached) $ac_c" 1>&6 1439 1474 else 1440 1475 cat > conftest.$ac_ext <<EOF 1441 #line 14 42"configure"1476 #line 1477 "configure" 1442 1477 #include "confdefs.h" 1443 1478 /* System header to define __stub macros and hopefully few prototypes, … … 1462 1497 ; return 0; } 1463 1498 EOF 1464 if { (eval echo configure:1 465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1499 if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1465 1500 rm -rf conftest* 1466 1501 eval "ac_cv_func_$ac_func=yes" … … 1491 1526 do 1492 1527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1493 echo "configure:1 494: checking for $ac_func" >&51528 echo "configure:1529: checking for $ac_func" >&5 1494 1529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1495 1530 echo $ac_n "(cached) $ac_c" 1>&6 1496 1531 else 1497 1532 cat > conftest.$ac_ext <<EOF 1498 #line 1 499"configure"1533 #line 1534 "configure" 1499 1534 #include "confdefs.h" 1500 1535 /* System header to define __stub macros and hopefully few prototypes, … … 1519 1554 ; return 0; } 1520 1555 EOF 1521 if { (eval echo configure:15 22: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1556 if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1522 1557 rm -rf conftest* 1523 1558 eval "ac_cv_func_$ac_func=yes" … … 1545 1580 if test "$ac_cv_func_gettimeofday" = yes; then 1546 1581 echo $ac_n "checking for struct timezone""... $ac_c" 1>&6 1547 echo "configure:15 48: checking for struct timezone" >&51582 echo "configure:1583: checking for struct timezone" >&5 1548 1583 if eval "test \"`echo '$''{'g77_cv_struct_timezone'+set}'`\" = set"; then 1549 1584 echo $ac_n "(cached) $ac_c" 1>&6 1550 1585 else 1551 1586 cat > conftest.$ac_ext <<EOF 1552 #line 15 53"configure"1587 #line 1588 "configure" 1553 1588 #include "confdefs.h" 1554 1589 #include <sys/time.h> … … 1557 1592 ; return 0; } 1558 1593 EOF 1559 if { (eval echo configure:15 60: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1594 if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1560 1595 rm -rf conftest* 1561 1596 g77_cv_struct_timezone=yes … … 1578 1613 else 1579 1614 cat > conftest.$ac_ext <<EOF 1580 #line 1 581"configure"1615 #line 1616 "configure" 1581 1616 #include "confdefs.h" 1582 1617 … … 1601 1636 } 1602 1637 EOF 1603 if { (eval echo configure:16 04: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1638 if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1604 1639 then 1605 1640 cat >> confdefs.h <<\EOF … … 1617 1652 1618 1653 echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6 1619 echo "configure:16 20: checking whether gettimeofday can accept two arguments" >&51654 echo "configure:1655: checking whether gettimeofday can accept two arguments" >&5 1620 1655 if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then 1621 1656 echo $ac_n "(cached) $ac_c" 1>&6 1622 1657 else 1623 1658 cat > conftest.$ac_ext <<EOF 1624 #line 16 25"configure"1659 #line 1660 "configure" 1625 1660 #include "confdefs.h" 1626 1661 … … 1648 1683 ; return 0; } 1649 1684 EOF 1650 if { (eval echo configure:16 51: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1685 if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1651 1686 rm -rf conftest* 1652 1687 emacs_cv_gettimeofday_two_arguments=yes -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/configure.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 24 24 AC_CONFIG_HEADER(config.h:config.hin) 25 25 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 37 26 dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may 38 27 dnl not be able to. … … 42 31 # the makefiles 43 32 AC_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. 37 AC_MSG_CHECKING(whether _XOPEN_SOURCE may be defined) 38 AC_TRY_COMPILE([#define _XOPEN_SOURCE 600L 39 #include <unistd.h>],, 40 may_use_xopen_source=yes, 41 may_use_xopen_source=no) 42 AC_MSG_RESULT($may_use_xopen_source) 43 if 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]) 50 fi 51 52 dnl Checks for programs. 44 53 45 54 LIBTOOL='$(SHELL) ../libtool' … … 71 80 dnl Checks for header files. 72 81 AC_HEADER_STDC 73 dnl We could do this if we didn't know we were using gcc74 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 body78 dnl [return 0;} int foo (int * bar) {],79 dnl ac_cv_sys_proto=yes,80 dnl [ac_cv_sys_proto=no81 dnl AC_DEFINE(KR_headers)])])82 dnl AC_MSG_RESULT($ac_cv_sys_proto)83 84 82 AC_HEADER_TIME 85 83 AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/ctime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 40 40 /* may need sys/time.h & long arg for stime (bsd, svr1-3) */ 41 41 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 43 G77_ctime_0 (char *chtime, const ftnlen Lchtime, longint * xstime) 50 44 { 51 int i, l;52 45 int s_copy (); 53 46 time_t stime = *xstime; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/date_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 10 10 static integer c__5 = 5; 11 11 12 /* Subroutine */ int G77_date_y2kbug_0 (char *buf, ftnlen buf_len) 12 /* Subroutine */ int 13 G77_date_y2kbug_0 (char *buf, ftnlen buf_len) 13 14 { 14 15 16 17 18 15 /* System generated locals */ 16 address a__1[5]; 17 longint i__1; 18 integer i__2[5]; 19 char ch__1[24]; 19 20 20 21 /* Subroutine */ int s_copy(), s_cat();21 /* Builtin functions */ 22 /* Subroutine */ int s_copy (), s_cat (); 22 23 23 24 25 26 extern /* Character */ VOIDG77_ctime_0 ();24 /* Local variables */ 25 static char cbuf[24]; 26 extern longint G77_time_0 (); 27 extern /* Character */ void G77_ctime_0 (); 27 28 28 29 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); 31 32 /* Writing concatenation */ 32 33 34 35 36 37 s_cat(buf, a__1, i__2, &c__5, buf_len);38 39 } 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_ */ 40 41 41 42 #ifdef PIC … … 43 44 44 45 const char *G77_Non_Y2K_Compliance_Message = 45 46 "Call to non Y2K compliant subroutine detected."; 46 47 47 int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len) 48 int 49 G77_date_y2kbuggy_0 (char *buf __attribute__ ((__unused__)), 50 ftnlen buf_len __attribute__ ((__unused__))) 48 51 { 49 extern int G77_abort_0 ();52 extern int G77_abort_0 (); 50 53 fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message); 51 G77_abort_0 ();54 G77_abort_0 (); 52 55 } 53 56 #endif 54 55 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/datetime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 32 32 # endif 33 33 #endif 34 #if defined (_WIN32) 35 #include <windows.h> 36 #undef min 37 #undef max 38 #endif 34 39 #include "f2c.h" 35 40 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 41 void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 41 42 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) 43 int 44 G77_date_and_time_0 (char *date, char *fftime, char *zone, 45 integer * values, ftnlen date_len, 46 ftnlen fftime_len, ftnlen zone_len) 45 47 { 46 time_t lt =time(<);47 struct tm ltime = *localtime (<), gtime = *gmtime(<);48 time_t lt = time (<); 49 struct tm ltime = *localtime (<), gtime = *gmtime (<); 48 50 char dat[9], zon[6], ftim[11]; 49 51 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 50 60 51 61 vals[0] = 1900 + ltime.tm_year; … … 54 64 /* fixme: year boundaries */ 55 65 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))); 58 68 vals[4] = ltime.tm_hour; 59 69 vals[5] = ltime.tm_min; 60 70 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. */63 71 #if HAVE_GETTIMEOFDAY 64 72 { 65 73 struct timeval tp; 66 74 # if GETTIMEOFDAY_ONE_ARGUMENT 67 if (! 75 if (!gettimeofday (&tp)) 68 76 # else 69 77 # if HAVE_STRUCT_TIMEZONE … … 75 83 non-NULL arg and pretends that struct timezone is missing if it 76 84 does fail. */ 77 if (! 85 if (!gettimeofday (&tp, &tzp)) 78 86 # else 79 if (! 87 if (!gettimeofday (&tp, (void *) 0)) 80 88 # endif /* HAVE_STRUCT_TIMEZONE */ 81 89 # endif /* GETTIMEOFDAY_ONE_ARGUMENT */ 82 vals[7] = tp.tv_usec /1000;90 vals[7] = tp.tv_usec / 1000; 83 91 } 84 92 #endif /* HAVE_GETTIMEOFDAY */ 85 93 if (values) /* null pointer for missing optional */ 86 for (i =0; i<=7; i++)94 for (i = 0; i <= 7; i++) 87 95 values[i] = vals[i]; 88 96 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 } 98 108 return 0; 99 109 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/dbes.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 17 17 Boston, MA 02111-1307, USA. */ 18 18 19 #if 0 19 #if 0 /* Don't include these unless necessary -- dnp. */ 20 20 #include "f2c.h" 21 21 #include <math.h> 22 22 23 double G77_dbesj0_0 (const double *x) { 24 return j0 (*x); 23 double 24 G77_dbesj0_0 (const double *x) 25 { 26 return j0 (*x); 25 27 } 26 28 27 double G77_dbesj1_0 (const double *x) { 28 return j1 (*x); 29 double 30 G77_dbesj1_0 (const double *x) 31 { 32 return j1 (*x); 29 33 } 30 34 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); 35 double 36 G77_dbesjn_0 (const integer * n, double *x) 37 { 38 return jn (*n, *x); 37 39 } 38 40 39 double G77_dbesy1_0 (const double *x) { 40 return y1 (*x); 41 double 42 G77_dbesy0_0 (const double *x) 43 { 44 return y0 (*x); 41 45 } 42 46 43 double G77_dbesyn_0 (const integer *n, double *x) { 44 return yn (*n, *x); 47 double 48 G77_dbesy1_0 (const double *x) 49 { 50 return y1 (*x); 51 } 52 53 double 54 G77_dbesyn_0 (const integer * n, double *x) 55 { 56 return yn (*n, *x); 45 57 } 46 58 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/dtime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 45 45 #include "f2c.h" 46 46 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 47 double 48 G77_dtime_0 (real tarray[2]) 60 49 { 61 50 #if defined (_WIN32) … … 69 58 win32_platform = osv.dwPlatformId; 70 59 } 71 60 72 61 /* We need to use this hack on non-NT platforms, where the first call 73 62 returns 0.0 and subsequent ones return the correct value. */ … … 83 72 { 84 73 LARGE_INTEGER freq; 85 if (! 74 if (!QueryPerformanceFrequency (&freq)) 86 75 { 87 76 errno = ENOSYS; … … 91 80 { 92 81 clock_freq = ((unsigned long long) freq.HighPart << 32) 93 82 + ((unsigned) freq.LowPart); 94 83 } 95 84 } 96 85 97 if (! 86 if (!QueryPerformanceCounter (&counter_val)) 98 87 return -1.0; 99 88 100 89 count = ((unsigned long long) counter_val.HighPart << 32) 101 90 + (unsigned) counter_val.LowPart; 102 91 delta = ((double) (count - old_count)) / clock_freq; 103 92 tarray[0] = (float) delta; … … 113 102 GetProcessTimes (GetCurrentProcess (), &creation_time, &exit_time, 114 103 &kernel_time, &user_time); 115 utime = ((unsigned long long) user_time.dwHighDateTime << 32) 116 117 stime = ((unsigned long long) kernel_time.dwHighDateTime << 32) 118 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; 119 108 120 109 tarray[0] = (utime - old_utime) / 1.0e7; … … 132 121 struct rusage rbuff; 133 122 134 135 136 137 (float) (rbuff.ru_utime).tv_usec/1000000.0;138 139 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; 141 130 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; 143 138 time_t utime, stime; 144 139 static time_t old_utime = 0, old_stime = 0; … … 148 143 fixme: does using _POSIX_VERSION help? */ 149 144 # 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); 151 147 # elif defined CLOCKS_PER_SECOND 152 if (! clk_tck) clk_tck = CLOCKS_PER_SECOND; 148 if (!clk_tck) 149 clk_tck = CLOCKS_PER_SECOND; 153 150 # elif defined CLK_TCK 154 if (! clk_tck) clk_tck = CLK_TCK; 151 if (!clk_tck) 152 clk_tck = CLK_TCK; 155 153 # elif defined HZ 156 if (! clk_tck) clk_tck = HZ; 154 if (!clk_tck) 155 clk_tck = HZ; 157 156 # elif defined HAVE_GETRUSAGE 158 157 # else 159 158 #error Dont know clock tick length 160 159 # 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; 165 166 #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]); 168 170 #else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ 169 171 errno = ENOSYS; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/etime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 45 45 #include "f2c.h" 46 46 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 47 double 48 G77_etime_0 (real tarray[2]) 60 49 { 61 50 #if defined (_WIN32) … … 70 59 win32_platform = osv.dwPlatformId; 71 60 } 72 61 73 62 /* non-NT platforms don't have a clue as to how long a process has 74 63 been running, so simply return the uptime. Bad judgement call? */ … … 83 72 { 84 73 LARGE_INTEGER freq; 85 if (! 74 if (!QueryPerformanceFrequency (&freq)) 86 75 { 87 76 errno = ENOSYS; … … 91 80 { 92 81 clock_freq = ((unsigned long long) freq.HighPart << 32) 93 94 if (! 82 + ((unsigned) freq.LowPart); 83 if (!QueryPerformanceCounter (&counter_val)) 95 84 return -1.0; 96 85 old_count = ((unsigned long long) counter_val.HighPart << 32) 97 86 + (unsigned) counter_val.LowPart; 98 87 } 99 88 } 100 89 101 if (! 90 if (!QueryPerformanceCounter (&counter_val)) 102 91 return -1.0; 103 92 104 93 count = ((unsigned long long) counter_val.HighPart << 32) 105 94 + (unsigned) counter_val.LowPart; 106 95 tarray[0] = usertime = (double) (count - old_count) / clock_freq; 107 96 tarray[1] = systime = 0.0; … … 115 104 &kernel_time, &user_time); 116 105 utime = ((unsigned long long) user_time.dwHighDateTime << 32) 117 106 + (unsigned) user_time.dwLowDateTime; 118 107 stime = ((unsigned long long) kernel_time.dwHighDateTime << 32) 119 108 + (unsigned) kernel_time.dwLowDateTime; 120 109 121 110 tarray[0] = usertime = utime / 1.0e7; 122 111 tarray[1] = systime = stime / 1.0e7; 123 }112 } 124 113 return usertime + systime; 125 114 … … 129 118 struct rusage rbuff; 130 119 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; 138 133 struct tms buffer; 139 134 … … 141 136 fixme: does using _POSIX_VERSION help? */ 142 137 # 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); 144 140 # elif defined CLOCKS_PER_SECOND 145 if (! clk_tck) clk_tck = CLOCKS_PER_SECOND; 141 if (!clk_tck) 142 clk_tck = CLOCKS_PER_SECOND; 146 143 # elif defined CLK_TCK 147 if (! clk_tck) clk_tck = CLK_TCK; 144 if (!clk_tck) 145 clk_tck = CLK_TCK; 148 146 # elif defined HZ 149 if (! clk_tck) clk_tck = HZ; 147 if (!clk_tck) 148 clk_tck = HZ; 150 149 # elif defined HAVE_GETRUSAGE 151 150 # else 152 151 #error Dont know clock tick length 153 152 # 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; 157 157 #endif /* HAVE_GETRUSAGE */ 158 return (tarray[0] +tarray[1]);158 return (tarray[0] + tarray[1]); 159 159 #else /* ! HAVE_GETRUSAGE && ! HAVE_TIMES */ 160 160 errno = ENOSYS; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/fdate_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 44 44 essentially the same for both. */ 45 45 46 /* Character *24 */ void G77_fdate_0 (char *ret_val, ftnlen ret_val_len) 46 /* Character *24 */ void 47 G77_fdate_0 (char *ret_val, ftnlen ret_val_len) 47 48 { 48 49 50 51 52 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); 54 55 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/fgetc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 #include "fio.h" 28 28 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 29 integer 30 G77_fgetc_0 (const integer * lunit, char *c, ftnlen Lc) 37 31 { 38 32 int err; 39 33 FILE *f = f__units[*lunit].ufd; 40 34 41 if (*lunit >=MXUNIT || *lunit<0)35 if (*lunit >= MXUNIT || *lunit < 0) 42 36 return 101; /* bad unit error */ 43 37 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 = ' '; 51 53 return 0; 52 53 c[0] = err; 54 while (--Lc) 55 *++c = ' '; 56 return 0; } 54 } 57 55 } 58 56 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 57 integer 58 G77_fget_0 (char *c, const ftnlen Lc) 66 59 { 67 60 integer five = 5; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/flush1_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 26 26 /* This flushes a single unit, c.f. libI77 version. */ 27 27 28 #ifdef KR_headers29 extern integer G77_fnum_0 ();30 31 /* Subroutine */ int G77_flush1_0 (lunit)32 integer *lunit;33 #else34 28 extern integer G77_fnum_0 (integer *); 35 29 36 /* Subroutine */ int G77_flush1_0 (const integer *lunit)37 #endif 30 /* Subroutine */ int 31 G77_flush1_0 (const integer * lunit) 38 32 { 39 if (*lunit >=MXUNIT || *lunit<0)40 err (1,101,"flush");33 if (*lunit >= MXUNIT || *lunit < 0) 34 err (1, 101, "flush"); 41 35 /* f__units is a table of descriptions for the unit numbers (defined 42 36 in io.h) with file descriptors rather than streams */ 43 37 if (f__units[*lunit].ufd != NULL && f__units[*lunit].uwrt) 44 fflush (f__units[*lunit].ufd);38 fflush (f__units[*lunit].ufd); 45 39 return 0; 46 40 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/fnum_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 23 23 #include "fio.h" 24 24 25 #ifdef KR_headers 26 integer G77_fnum_0 (lunit) 27 integer *lunit; 28 #else 29 integer G77_fnum_0 (integer *lunit) 30 #endif 25 integer 26 G77_fnum_0 (integer * lunit) 31 27 { 32 if (*lunit >=MXUNIT || *lunit<0)33 err (1,101,"fnum");28 if (*lunit >= MXUNIT || *lunit < 0) 29 err (1, 101, "fnum"); 34 30 /* f__units is a table of descriptions for the unit numbers (defined 35 31 in io.h). Use file descriptor (ufd) and fileno rather than udev 36 32 field since udev is unix specific */ 37 return fileno (f__units[*lunit].ufd);33 return fileno (f__units[*lunit].ufd); 38 34 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/fputc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 #include "fio.h" 28 28 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 29 integer 30 G77_fputc_0 (const integer * lunit, const char *c, 31 const ftnlen Lc __attribute__ ((__unused__))) 37 32 { 38 33 int err; 39 34 FILE *f = f__units[*lunit].ufd; 40 35 41 if (*lunit >=MXUNIT || *lunit<0)36 if (*lunit >= MXUNIT || *lunit < 0) 42 37 return 101; /* bad unit error */ 43 38 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 } 50 46 else 51 47 return 0; 52 48 } 53 49 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 50 integer 51 G77_fput_0 (const char *c, const ftnlen Lc) 61 52 { 62 53 integer six = 6; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/fstat_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 #include <sys/stat.h> 28 28 29 #ifdef KR_headers30 extern integer G77_fnum_0 ();31 32 integer G77_fstat_0 (lunit, statb)33 integer *lunit;34 integer statb[13];35 #else36 29 extern integer G77_fnum_0 (const integer *); 37 30 38 integer G77_fstat_0 (const integer *lunit, integer statb[13])39 #endif 31 integer 32 G77_fstat_0 (const integer * lunit, integer statb[13]) 40 33 { 41 34 int err; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/gerror_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 30 30 31 31 #ifndef HAVE_STRERROR 32 extern char *sys_errlist[];32 extern char *sys_errlist[]; 33 33 # define strerror(i) (sys_errlist[i]) 34 34 #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 35 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 36 /* Subroutine */ int 37 G77_gerror_0 (char *str, ftnlen Lstr) 43 38 { 44 char * 39 char *s; 45 40 46 s = strerror (errno);41 s = strerror (errno); 47 42 s_copy (str, s, Lstr, strlen (s)); 48 43 return 0; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/getcwd_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 35 35 # include <unistd.h> 36 36 #else 37 37 extern char *getcwd (); 38 38 #endif 39 39 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 40 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 41 integer 42 G77_getcwd_0 (char *str, const ftnlen Lstr) 48 43 { 49 50 44 int i; 45 char *ret; 51 46 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; 57 53 } 58 54 … … 62 58 63 59 # 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 60 extern char *getwd (); 61 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 62 integer 63 G77_getcwd_0 (char *str, const ftnlen Lstr) 73 64 { 74 65 char pathname[MAXPATHLEN]; 75 66 size_t l; 76 67 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 } 83 77 } 84 78 85 #else 79 #else /* !HAVE_GETWD && !HAVE_GETCWD */ 86 80 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 81 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 82 integer 83 G77_getcwd_0 (char *str, const ftnlen Lstr) 95 84 { 96 85 return errno = ENOSYS; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/getgid_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 #include "f2c.h" 28 28 29 #ifdef KR_headers 30 integer G77_getgid_0 () 31 #else 32 integer G77_getgid_0 (void) 33 #endif 29 integer 30 G77_getgid_0 (void) 34 31 { 35 32 #if defined (HAVE_GETGID) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/getlog_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 42 42 /* SGI also has character*(*) function getlog() */ 43 43 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 44 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 45 /* Subroutine */ int 46 G77_getlog_0 (char *str, const ftnlen Lstr) 52 47 { 53 48 size_t i; … … 57 52 #if defined (HAVE_GETLOGIN) 58 53 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 } 65 63 status = 0; 66 64 #else -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/getpid_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 26 26 #include "f2c.h" 27 27 28 #ifdef KR_headers 29 integer G77_getpid_0 () 30 #else 31 integer G77_getpid_0 (void) 32 #endif 28 integer 29 G77_getpid_0 (void) 33 30 { 34 31 return getpid (); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/getuid_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 #include "f2c.h" 28 28 29 #ifdef KR_headers 30 integer G77_getuid_0 () 31 #else 32 integer G77_getuid_0 (void) 33 #endif 29 integer 30 G77_getuid_0 (void) 34 31 { 35 32 #if defined (HAVE_GETUID) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/gmtime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #include "f2c.h" 35 35 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 37 G77_gmtime_0 (const integer * xstime, integer tarray[9]) 42 38 { 43 39 struct tm *lt; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/hostnm_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 31 31 #include "f2c.h" 32 32 33 integer G77_hostnm_0 (char *name, ftnlen Lname) 33 integer 34 G77_hostnm_0 (char *name, ftnlen Lname) 34 35 { 35 36 int ret, i; 36 37 37 38 #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] = ' '; 44 46 } 45 47 return ret; 46 48 #else 47 49 return errno = ENOSYS; 48 50 #endif 49 51 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/idate_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 38 38 /* libU77 one: */ 39 39 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 41 G77_idate_0 (int iarray[3]) 46 42 { 47 43 struct tm *lt; 48 44 time_t tim; 49 tim = time (NULL);50 lt = localtime (&tim);45 tim = time (NULL); 46 lt = localtime (&tim); 51 47 iarray[0] = lt->tm_mday; 52 48 iarray[1] = lt->tm_mon + 1; /* in range 1-12 in SunOS (experimentally) */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/ierrno_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 23 23 #include "f2c.h" 24 24 25 #ifdef KR_headers 26 integer G77_ierrno_0 () 27 #else 28 integer G77_ierrno_0 (void) 29 #endif 25 integer 26 G77_ierrno_0 (void) 30 27 { 31 28 return errno; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/irand_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 32 32 /* Note this is per SunOS -- other s may have no arg. */ 33 33 34 #ifdef KR_headers 35 integer G77_irand_0 (flag) 36 integer *flag; 37 #else 38 integer G77_irand_0 (integer *flag) 39 #endif 34 integer 35 G77_irand_0 (integer * flag) 40 36 { 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 } 50 47 return rand (); 51 48 } 52 53 54 55 56 57 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/isatty_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 26 26 #include "fio.h" 27 27 28 #ifdef KR_headers29 extern integer G77_fnum_0 ();30 31 logical G77_isatty_0 (lunit)32 integer *lunit;33 #else34 28 extern integer G77_fnum_0 (integer *); 35 29 36 logical G77_isatty_0 (integer *lunit)37 #endif 30 logical 31 G77_isatty_0 (integer * lunit) 38 32 { 39 if (*lunit >=MXUNIT || *lunit<0)40 err (1,101,"isatty");33 if (*lunit >= MXUNIT || *lunit < 0) 34 err (1, 101, "isatty"); 41 35 /* f__units is a table of descriptions for the unit numbers (defined 42 36 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_); 44 38 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/itime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #include "f2c.h" 35 35 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 37 G77_itime_0 (integer tarray[3]) 42 38 { 43 39 struct tm *lt; 44 40 time_t tim; 45 41 46 tim = time (NULL);47 lt = localtime (&tim);42 tim = time (NULL); 43 lt = localtime (&tim); 48 44 tarray[0] = lt->tm_hour; 49 45 tarray[1] = lt->tm_min; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/kill_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 27 27 /* fixme: bsd, svr1-3 use int, not pid_t */ 28 28 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 29 integer 30 G77_kill_0 (const integer * pid, const integer * signum) 35 31 { 36 32 #if defined (HAVE_KILL) 37 return kill ((pid_t) * pid, *signum) ? errno : 0;33 return kill ((pid_t) * pid, *signum) ? errno : 0; 38 34 #else 39 35 errno = ENOSYS; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/link_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 35 35 #include "f2c.h" 36 36 37 #ifdef KR_headers 38 void g_char (); 37 void g_char (const char *a, ftnlen alen, char *b); 39 38 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 39 integer 40 G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, 41 const ftnlen Lpath2) 47 42 { 48 43 #if defined (HAVE_LINK) 49 44 char *buff1, *buff2; 50 char *bp, *blast;51 45 int i; 52 46 53 buff1 = malloc (Lpath1+1); 54 if (buff1 == NULL) return -1; 47 buff1 = malloc (Lpath1 + 1); 48 if (buff1 == NULL) 49 return -1; 55 50 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; 58 54 g_char (path2, Lpath2, buff2); 59 55 i = link (buff1, buff2); 60 free (buff1); free (buff2); 56 free (buff1); 57 free (buff2); 61 58 return i ? errno : 0; 62 59 #else /* ! HAVE_LINK */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/lnblnk_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 22 22 #include "f2c.h" 23 23 24 integer G77_lnblnk_0 (char *str, ftnlen str_len) 24 integer 25 G77_lnblnk_0 (char *str, ftnlen str_len) 25 26 { 26 27 integer i_len();27 integer ret_val; 28 integer i_len (); 28 29 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; 32 35 } 33 36 } 34 37 return ret_val; 35 38 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/lstat_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 31 31 /* lstat isn't posix */ 32 32 33 #ifdef KR_headers 34 void g_char(); 33 void g_char (const char *a, ftnlen alen, char *b); 35 34 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 35 integer 36 G77_lstat_0 (const char *name, integer statb[13], const ftnlen Lname) 45 37 { 46 38 #if HAVE_LSTAT 47 39 char *buff; 48 char *bp, *blast;49 40 int err; 50 41 struct stat buf; 51 42 52 buff = malloc (Lname+1); 53 if (buff == NULL) return -1; 43 buff = malloc (Lname + 1); 44 if (buff == NULL) 45 return -1; 54 46 g_char (name, Lname, buff); 55 47 err = lstat (buff, &buf); … … 81 73 #endif 82 74 return err; 83 #else 75 #else /* !HAVE_LSTAT */ 84 76 return errno = ENOSYS; 85 #endif 77 #endif /* !HAVE_LSTAT */ 86 78 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/ltime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #include "f2c.h" 35 35 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 37 G77_ltime_0 (const integer * xstime, integer tarray[9]) 42 38 { 43 39 struct tm *lt; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/mclock_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 /* Reported by wd42ej@sgi83.wwb.noaa.gov (Russ Jones AUTO-Sun3) on AIX. */ 35 35 36 #ifdef KR_headers 37 longint G77_mclock_0 () 38 #else 39 longint G77_mclock_0 (void) 40 #endif 36 longint 37 G77_mclock_0 (void) 41 38 { 42 39 #if HAVE_CLOCK -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/perror_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 29 29 #include "f2c.h" 30 30 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 32 G77_perror_0 (const char *str, const ftnlen Lstr) 37 33 { 38 34 char buff[1000]; … … 41 37 /* same technique as `system' -- what's wrong with malloc? */ 42 38 blast = buff + (Lstr < 1000 ? Lstr : 1000); 43 for (bp = buff ; bp<blast && *str!='\0' ;)39 for (bp = buff; bp < blast && *str != '\0';) 44 40 *bp++ = *str++; 45 41 *bp = '\0'; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/rand_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 35 35 /* Note this is per SunOS -- other s may have no arg. */ 36 36 37 #ifdef KR_headers 38 double G77_rand_0 (flag) 39 integer *flag; 40 #else 41 double G77_rand_0 (integer *flag) 42 #endif 37 double 38 G77_rand_0 (integer * flag) 43 39 { 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 } 53 50 return (float) rand () / RAND_MAX; 54 51 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/rename_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 30 30 #include "f2c.h" 31 31 32 #ifdef KR_headers 33 void g_char (); 32 void g_char (const char *a, ftnlen alen, char *b); 34 33 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 34 integer 35 G77_rename_0 (const char *path1, const char *path2, const ftnlen Lpath1, 36 const ftnlen Lpath2) 42 37 { 43 38 char *buff1, *buff2; 44 char *bp, *blast;45 39 int i; 46 40 47 buff1 = malloc (Lpath1+1); 48 if (buff1 == NULL) return -1; 41 buff1 = malloc (Lpath1 + 1); 42 if (buff1 == NULL) 43 return -1; 49 44 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; 52 48 g_char (path2, Lpath2, buff2); 53 49 i = rename (buff1, buff2); 54 free (buff1); free (buff2); 50 free (buff1); 51 free (buff2); 55 52 return i ? errno : 0; 56 53 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/secnds_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 37 37 /* This is a VMS intrinsic. */ 38 38 39 double G77_secnds_0 (real *r) 39 double 40 G77_secnds_0 (real * r) 40 41 { 41 42 43 42 struct tm *lt; 43 time_t clock; 44 float f; 44 45 45 46 47 f= (3600.0*((real)lt->tm_hour) + 60.0*((real)lt->tm_min) +48 (real)lt->tm_sec - *r);49 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; 50 51 } 51 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/second_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 19 19 #include "f2c.h" 20 20 21 double G77_second_0 () { 21 double 22 G77_second_0 () 23 { 22 24 extern double G77_etime_0 (); 23 25 real tarray[2]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/sleep_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 26 26 27 27 /* 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 28 int 29 G77_sleep_0 (const integer * seconds) 34 30 { 35 31 (void) sleep ((unsigned int) *seconds); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/srand_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 25 25 #include "f2c.h" 26 26 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 */ 28 int 29 G77_srand_0 (const integer * seed) 34 30 { 35 31 srand ((unsigned int) *seed); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/stat_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 28 28 #include "f2c.h" 29 29 30 #ifdef KR_headers 31 void g_char (); 30 void g_char (const char *a, ftnlen alen, char *b); 32 31 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 32 integer 33 G77_stat_0 (const char *name, integer statb[13], const ftnlen Lname) 42 34 { 43 35 char *buff; 44 char *bp, *blast;45 36 int err; 46 37 struct stat buf; 47 38 48 buff = malloc (Lname+1); 49 if (buff == NULL) return -1; 39 buff = malloc (Lname + 1); 40 if (buff == NULL) 41 return -1; 50 42 g_char (name, Lname, buff); 51 43 err = stat (buff, &buf); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/symlnk_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #include "f2c.h" 35 35 36 #ifdef KR_headers 37 void g_char (); 36 void g_char (const char *a, ftnlen alen, char *b); 38 37 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 38 integer 39 G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1, 40 const ftnlen Lpath2) 46 41 { 47 42 #if HAVE_SYMLINK 48 43 char *buff1, *buff2; 49 char *bp, *blast;50 44 int i; 51 45 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; 54 49 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; 57 53 g_char (path2, Lpath2, buff2); 58 54 i = symlink (buff1, buff2); 59 free (buff1); free (buff2); 55 free (buff1); 56 free (buff2); 60 57 return i ? errno : 0; 61 #else 58 #else /* !HAVE_SYMLINK */ 62 59 return errno = ENOSYS; 63 #endif 60 #endif /* !HAVE_SYMLINK */ 64 61 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/sys_clock_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 44 44 #include "f2c.h" 45 45 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 46 int 47 G77_system_clock_0 (integer * count, integer * count_rate, 48 integer * count_max) 52 49 { 53 50 #if defined (HAVE_TIMES) 54 51 struct tms buffer; 55 52 unsigned long cnt; 56 if (count_rate) { 53 if (count_rate) 54 { 57 55 #ifdef _SC_CLK_TCK 58 *count_rate = sysconf(_SC_CLK_TCK);56 *count_rate = sysconf (_SC_CLK_TCK); 59 57 #elif defined CLOCKS_PER_SECOND 60 *count_rate = CLOCKS_PER_SECOND;58 *count_rate = CLOCKS_PER_SECOND; 61 59 #elif defined CLK_TCK 62 *count_rate = CLK_TCK;60 *count_rate = CLK_TCK; 63 61 #elif defined HZ 64 *count_rate = HZ;62 *count_rate = HZ; 65 63 #else 66 64 #error Dont know clock tick length 67 65 #endif 68 }66 } 69 67 if (count_max) /* optional arg present? */ 70 *count_max = INT_MAX; 68 *count_max = INT_MAX; /* dubious */ 71 69 cnt = times (&buffer); 72 70 if (cnt > (unsigned long) (INT_MAX)) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/time_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 36 36 subroutine which fills a character argument (which is the VMS way) 37 37 -- caveat emptor. */ 38 #ifdef KR_headers 39 longint G77_time_0 () 40 #else 41 longint G77_time_0 (void) 42 #endif 38 longint 39 G77_time_0 (void) 43 40 { 44 41 /* There are potential problems with the cast of the time_t here. */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/ttynam_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 36 36 #include "f2c.h" 37 37 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 38 extern integer G77_fnum_0 (integer * lunit); 39 extern void s_copy (register char *a, register char *b, ftnlen la, ftnlen lb); 40 /* Character */ void 41 G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer * lunit) 48 42 { 49 43 #if defined (HAVE_TTYNAME) … … 52 46 53 47 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 } 60 57 #else 61 58 errno = ENOSYS; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/umask_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 24 24 #include "f2c.h" 25 25 26 #ifdef KR_headers 27 integer G77_umask_0 (mask) 28 integer *mask; 29 #else 30 integer G77_umask_0 (integer *mask) 31 #endif 26 integer 27 G77_umask_0 (integer * mask) 32 28 { 33 return umask ((mode_t) * mask);29 return umask ((mode_t) * mask); 34 30 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/unlink_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 34 34 #include "f2c.h" 35 35 36 #ifdef KR_headers 37 void g_char (); 36 void g_char (const char *a, ftnlen alen, char *b); 38 37 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 38 integer 39 G77_unlink_0 (const char *str, const ftnlen Lstr) 46 40 { 47 41 char *buff; 48 char *bp, *blast;49 42 int i; 50 43 51 buff = malloc (Lstr+1); 52 if (buff == NULL) return -1; 44 buff = malloc (Lstr + 1); 45 if (buff == NULL) 46 return -1; 53 47 g_char (str, Lstr, buff); 54 48 i = unlink (buff); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/vxtidate_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 39 39 40 40 /* 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 41 int 42 G77_vxtidate_y2kbug_0 (integer * m, integer * d, integer * y) 47 43 { 48 44 struct tm *lt; 49 45 time_t tim; 50 tim = time (NULL);51 lt = localtime (&tim);46 tim = time (NULL); 47 lt = localtime (&tim); 52 48 *y = lt->tm_year % 100; 53 *m = lt->tm_mon +1;49 *m = lt->tm_mon + 1; 54 50 *d = lt->tm_mday; 55 51 return 0; … … 58 54 #ifdef PIC 59 55 extern 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 56 int 57 G77_vxtidate_y2kbuggy_0 (integer * m __attribute__ ((__unused__)), 58 integer * d __attribute__ ((__unused__)), 59 integer * y __attribute__ ((__unused__))) 66 60 { 67 extern int G77_abort_0 ();61 extern int G77_abort_0 (); 68 62 fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message); 69 G77_abort_0 ();63 G77_abort_0 (); 70 64 } 71 65 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libU77/vxttime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 40 40 41 41 /* 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 42 void 43 G77_vxttime_0 (char chtime[8], 44 const ftnlen Lchtime __attribute__ ((__unused__))) 49 45 { 50 46 time_t tim; 51 47 char *ctim; 52 tim = time (NULL);48 tim = time (NULL); 53 49 ctim = ctime (&tim); 54 strncpy (chtime, ctim +11, 8);50 strncpy (chtime, ctim + 11, 8); 55 51 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.