diff -uNr src.orig/config/Imake.cf src/config/Imake.cf --- src.orig/config/Imake.cf 2004-10-06 00:54:40.000000000 +0900 +++ src/config/Imake.cf 2005-11-07 21:28:40.000000000 +0900 @@ -217,6 +217,13 @@ #define MacIIArchitecture #endif /* macII */ +#ifdef __APPLE__ +# define MacroIncludeFile +# define MacroFile MacOSX.cf +# define MacOSXArchitecture +# define DarwinArchitecture +#endif + #ifdef _CRAY #define MacroIncludeFile #define MacroFile cray.cf diff -uNr src.orig/config/MacOSX.cf src/config/MacOSX.cf --- src.orig/config/MacOSX.cf 2005-11-07 21:28:40.000000000 +0900 +++ src/config/MacOSX.cf 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,165 @@ +XCOMM platform: $SFO: MOSXS.cf,v 1.0 95/11/19 23:21:00 sl Exp $ + +#define OSVendor Apple Computer, Inc. +#ifdef MacOSXArchitecture +#define OSName MacOSX +#define OSMajorVersion DefaultOSMajorVersion +#define OSMinorVersion DefaultOSMinorVersion +#define OSTeenyVersion 0 +#endif + +XCOMM #define ProjectRulesFile +XCOMM #define ProjectTmplFile + +#define InstKmemFlags -m 2755 -g kmem +/* #define ConstructMFLAGS NO */ + +#define HasNdbm YES +#define SetTtyGroup YES +#define HasBsearch YES +#ifdef MacOSXArchitecture +#define HasPutenv YES +#define MathLibrary /**/ +#define DBMLibrary /**/ +#define TermcapLibrary /**/ +#define HasBSD44Sockets YES +#define HAS_SNPRINTF YES +#endif + +#define NeedConstPrototypes YES +#define NeedVarargsPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedWidePrototypes NO + +#define GzipFontCompression YES +#define CompressAllFonts YES + +#ifndef HasShm +# define HasShm YES +#endif +#ifndef BuildGlxExt +# define BuildGlxExt YES +# define GlxUseNSGL YES +#endif +#define BuildServer YES +#define BuildXprint NO +#define BuildFonts YES +#define BuildDPMS NO + +#define TenonServer YES +#define XprtServer NO +#define XVendorString "Tenon Intersystems Xtools" +#define XVendorRelease 1000 +#ifndef UseRgbTxt +#define UseRgbTxt YES +#endif + +#define BuildPexExt NO + +#ifndef BuildGLXLibrary +# define BuildGLXLibrary YES +#endif + +/* no direct graphics extension */ +#define BuildXF86DGA NO + +/* no extra tablets and weird input devices */ +#define BuildXInputExt NO + +/* Build Xinerama (aka panoramiX) extension */ +#define BuildXinerama YES + +/* no Display Power Management extension */ +#define BuildDPMSExt NO + +# define BuildXvExt NO +#define OptimizedCDebugFlags -O0 -g -pipe +#define ExtraLoadFlags -L/usr/X11R6/lib + +#define BuildExamples YES + +#define StandardDefines -DCERNLIB_LINUX -DCERNLIB_PPC -DCERNLIB_MACOSX \ + -Dunix=unix -D__powerpc__ -D__DARWIN__ +/* -DX_NOT_POSIX -DX_LOCALE */ + +#define HasVoidSignalReturn YES + +#ifndef DependFlags +#define DependFlags -I/usr/include/ansi -I/usr/include/bsd +#endif + +#define InstallCmd install /* unlink old */ + +/* #define ArCmd libtool -a -o */ +#define ArCmd ar -r + +#ifndef RanlibCmd +#define RanlibCmd ranlib -c -s +#endif + +/* see below for ServerDefines */ + +#define PrimaryScreenResolution 95 /* for 17 inch screen */ + +#define ServerCDebugFlags -O0 -g -pipe + +/* #define HasGcc YES */ +#ifndef HasGcc +#define HasGcc YES +#endif + +#undef CcCmd +#undef CplusplusCmd +#ifdef MacOSXArchitecture +#if 0 +#define CcCmd cc -arch "ppc" -no-cpp-precomp -ftree-vectorize +#define CplusplusCmd c++ -no-cpp-precomp -ftree-vectorize +#else +#define CcCmd cc -ftree-vectorize +#define CplusplusCmd c++ -ftree-vectorize +#endif +#endif +#ifndef CcCmd +#define CcCmd cc +#endif + +#define CppCmd /usr/bin/cpp + +#include +#include +#undef XFree86Server +/* #define GLX_DIRECT_RENDERING */ + +#define f2cFortran YES +#define FortranCmd gfortran +#define XargsCmd xargs +#define FortranSaveFlags /* -fno-automatic */ /* Everything static !? */ +#define OptimisedFortranFlags -O0 -g -funroll-loops -fomit-frame-pointer \ + -ftree-vectorize +#define DefaultFCOptions -fno-second-underscore +#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX \ + -DCERNLIB_PPC -DCERNLIB_QMGLIBC \ + -DCERNLIB_MACOSX -DCERNLIB_GFORTRAN + +/* #define CERNLIB_SHIFT NO */ +#define CERNLIB_LINUX +#define CERNLIB_UNIX +#define CERNLIB_LNX +#define CERNLIB_PPC +#define CERNLIB_QMGLIBC +#define CERNLIB_MACOSX +#define CERNLIB_GFORTRAN + +#define X11Includes -I/usr/X11R6/include + +/* + * Create a Make Variable to allow building with/out Motif + */ +#undef MotifDependantMakeVar +#define MotifDependantMakeVar(variable,value) @@\ +ifneq ($(strip $(HAVE_MOTIF)),) @@\ + variable=value @@\ +endif @@\ +/* End CERNLIB changes */ + + diff -uNr src.orig/config/MacOSX.rules src/config/MacOSX.rules --- src.orig/config/MacOSX.rules 2005-11-07 21:28:40.000000000 +0900 +++ src/config/MacOSX.rules 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,117 @@ +XCOMM $XConsortium: MOSXS.rules,v 1.1 97/12/12 15:34:45 sl Exp $ + +/* + * MacOSX shared library rules + */ + +#define HasSharedLibraries YES + +#define ForceNormalLib NO + +#ifndef SharedDataSeparation +#define SharedDataSeparation YES +#endif +#ifndef SharedCodeDef +#define SharedCodeDef +#endif +#ifndef SharedLibraryDef +#define SharedLibraryDef -fno-common +#endif + +#define ShLibIncludeFile + +#ifndef SharedLibraryLoadFlags +#define SharedLibraryLoadFlags +#endif +#ifndef PositionIndependentCFlags +#define PositionIndependentCFlags +#endif + + + + +/* + * InstallSharedLibrary - generate rules to install the shared library. + */ +#ifndef InstallSharedLibrary +#define InstallSharedLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.dylib) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.dylib) $(DESTDIR)dest +@@\ + +#endif /* InstallSharedLibrary */ + +/* + * NormalSharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that the we do not hose people by having + * the library gone for long periods. + */ +#ifndef SharedLibraryTarget +#define SharedLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(lib,libname.dylib)) @@\ + @@\ +Concat(lib,libname.dylib): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + (cd down; $(CC) -I/usr/X11R6/lib -dynamiclib -undefined suppress -install_name /usr/X11R6/lib/$@ -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ + $(MV) $@~ $@ @@\ + LinkBuildLibrary($@) @@\ + @@\ +clean:: @@\ + $(RM) Concat(lib,libname.dylib) + +#endif /* SharedLibraryTarget */ + +/* + * SharedDepLibraryTarget - generate rules to create a shared library. + */ +#ifndef SharedDepLibraryTarget +#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.dylib)) @@\ + @@\ +Concat(lib,libname.dylib): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + (cd down; $(CC) -I/usr/X11R6/lib -dynamiclib -undefined suppress -install_name /usr/X11R6/lib/$@ -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + LinkBuildLibrary($@) @@\ + @@\ +clean:: @@\ + $(RM) Concat(lib,libname.dylib) + +#endif /* SharedDepLibraryTarget */ + +/* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ +#ifndef SharedLibraryDataTarget +#define SharedLibraryDataTarget(libname,rev,salist) +#endif /* SharedLibraryDataTarget */ + +#ifndef InstallSharedLibraryData +#define InstallSharedLibraryData(libname,rev,dest) +#endif /* InstallSharedLibraryData */ + +/* + * SharedLibReferences - variables for shared libraries + */ +#ifndef SharedLibReferences +#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\ +revname = rev @@\ +Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\ +Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ +LintLibReferences(varname,libname,libsource) +#endif + +/* + * SharedDSLibReferences - variables for shared libraries + */ +#ifndef SharedDSLibReferences +#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\ +revname = rev @@\ +Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\ +Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\ +LintLibReferences(varname,libname,libsource) +#endif + + diff -uNr src.orig/config/MacOSX.tmpl src/config/MacOSX.tmpl --- src.orig/config/MacOSX.tmpl 2005-11-07 21:28:40.000000000 +0900 +++ src/config/MacOSX.tmpl 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,67 @@ +XCOMM $XConsortium: MOSXS.tmpl,v 1.2 97/12/12 19:07:12 sl Exp $ + +/* + * Xnext shared library template + */ + + + +#ifndef SharedXtReqs +#define SharedXtReqs /**/ +#endif +#ifndef SharedXawReqs +#define SharedXawReqs /**/ +#endif +#ifndef SharedXmuReqs +#define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB) +#endif + +#define SharedLibX11 YES +#define SharedX11Rev F +SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) + +#define SharedLibXau NO /* don't need shared form */ +#define SharedLibXdmcp NO /* don't need shared form */ + +#define SharedLibXmu YES +#define SharedXmuRev F + +#define SharedOldXRev F + +#define SharedLibXext YES +#define SharedXextRev F + +#define SharedLibXt YES +#define SharedXtRev F +SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev) + +#define SharedXawRev F + +#define SharedXtfRev A + +#define SharedLibXi YES +#define SharedXiRev F +SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev) + +#define SharedLibXtst YES +#define SharedXtstRev F +SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev) + + +#define SharedPexRev F +SharedLibReferences(PEX,PEX5,$(PEXLIBSRC),SOPEXREV,SharedPexRev) + +#define SharedLibXie YES +#define SharedXieRev F + +#define SharedLibICE YES +#define SharedICERev F +SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev) + +#define SharedLibSM YES +#define SharedSMRev F +SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev) + +#define SharedFSRev F +SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev) + diff -uNr src.orig/config/linux.cf src/config/linux.cf --- src.orig/config/linux.cf 2004-10-06 00:56:45.000000000 +0900 +++ src/config/linux.cf 2005-11-08 14:10:31.000000000 +0900 @@ -224,14 +224,16 @@ # undef DefaultCCOptions # undef OptimizedCDebugFlags # undef StandardDefines -# define OptimizedCDebugFlags -O1 -fomit-frame-pointer +# define OptimizedCDebugFlags -O1 -g -fomit-frame-pointer #define f2cFortran YES -#define FortranCmd g77 +#define FortranCmd gfortran #define XargsCmd xargs #define FortranSaveFlags /* */ /* Everything static !? */ -#define DefaultFCOptions -fno-automatic -fno-second-underscore -fugly-complex -#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC +#define OptimisedFortranFlags -O0 -g -funroll-loops -fomit-frame-pointer +#define DefaultFCOptions -fno-second-underscore +#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC \ + -DCERNLIB_GFORTRAN # endif # endif @@ -242,6 +244,7 @@ #define CERNLIB_UNIX #define CERNLIB_LNX #define CERNLIB_QMGLIBC +#define CERNLIB_GFORTRAN /* # define CERNLIB_SHIFT YES uncomment this to make the shift packlib */ diff -uNr src.orig/geant321/peanut/bimsel.F src/geant321/peanut/bimsel.F --- src.orig/geant321/peanut/bimsel.F 1997-10-17 19:00:03.000000000 +0900 +++ src/geant321/peanut/bimsel.F 2005-11-07 21:28:40.000000000 +0900 @@ -46,7 +46,7 @@ & AUSFL , ZUSFL , BNDSAV, RADHLP, BFCHLP, BIMCLM, PRCOLP, & PRCOLN, IBTOLD, ICTOLD, KPROJ , NTRIAL, ITFRMI SAVE SBHAL0, SBSKI0, SBCEN0, SBCEN1, SBSKI1, SBHAL1 -#ifndef CERNLIB_WINNT +#if !defined(CERNLIB_WINNT) && !defined(CERNLIB_GFORTRAN) SAVE #endif DATA IBTOLD, ICTOLD / 2*0 / diff -uNr src.orig/mathlib/bvsl/test/tsbvsl.F src/mathlib/bvsl/test/tsbvsl.F --- src.orig/mathlib/bvsl/test/tsbvsl.F 1997-04-07 19:00:45.000000000 +0900 +++ src/mathlib/bvsl/test/tsbvsl.F 2005-11-07 21:28:40.000000000 +0900 @@ -42,6 +42,12 @@ CALL NRANIN(54321.) CALL NRAN(VEC,ILENG) * +#if defined(CERNLIB_GFORTRAN) + do kkk=1, leng + iy (kkk) = 0 + iy1(kkk) = 0 + end do +#endif CALL WHENEQ(ILENG,VEC,1,TSVAL,IY,NFOUND) CALL YLOSB(ILENG,VEC,TSVAL,YB,IFOUND,'EQ') CALL BINVEC(ILENG,YB,IY1) diff -uNr src.orig/mathlib/gen/b/rsrtnt64.F src/mathlib/gen/b/rsrtnt64.F --- src.orig/mathlib/gen/b/rsrtnt64.F 1996-04-02 00:01:51.000000000 +0900 +++ src/mathlib/gen/b/rsrtnt64.F 2005-11-07 21:28:40.000000000 +0900 @@ -117,8 +117,12 @@ ENDIF ELSE IF(N .EQ. 1) THEN +#if !defined(CERNLIB_GFORTRAN) ASSIGN 11 TO JMP1 GO TO 10 +#else +#include "rsrtnt64p1.inc" +#endif 11 IF(K .EQ. 0) THEN H=H ELSEIF(K .EQ. 1) THEN @@ -174,14 +178,22 @@ H=2*((H1+B*U)/RT(U)-(H1+B*V)/RT(V))/DELTA LB1=11 ELSEIF(K .EQ. 2) THEN +#if !defined(CERNLIB_GFORTRAN) ASSIGN 12 TO JMP1 GO TO 10 +#else +#include "rsrtnt64p1.inc" +#endif 12 H1=DELTA-B**2 H2=2*A*B H=(((H1*U-H2)/RT(U)-(H1*V-H2)/RT(V))/DELTA+H)/C ELSEIF(K .EQ. 3) THEN +#if !defined(CERNLIB_GFORTRAN) ASSIGN 13 TO JMP1 GO TO 10 +#else +#include "rsrtnt64p1.inc" +#endif 13 H1=C*DELTA G1=A*C G2=3*B**2 @@ -217,8 +229,12 @@ ENDIF ELSE IF(N .EQ. 1) THEN +#if !defined(CERNLIB_GFORTRAN) ASSIGN 21 TO JMP2 GO TO 20 +#else +#include "rsrtnt64p2.inc" +#endif 21 IF(K .EQ. -1) THEN H=H ELSEIF(K .EQ. -2) THEN @@ -257,8 +273,12 @@ IF(U. LT. -X0) H=-H ENDIF ELSE +#if !defined(CERNLIB_GFORTRAN) ASSIGN 22 TO JMP2 GO TO 20 +#else +#include "rsrtnt64p2.inc" +#endif 22 IF(K .EQ. -1) THEN H1=B*C H2=B**2-2*A*C @@ -287,6 +307,7 @@ ENDIF ENDIF ENDIF +#if !defined(CERNLIB_GFORTRAN) GO TO 9 10 C2=2*C @@ -327,6 +348,7 @@ ENDIF ENDIF GO TO JMP2, (21,22) +#endif 9 RES=SIGN(R1,V1-U1)*H LRL=LLL diff -uNr src.orig/mathlib/gen/b/rsrtnt64p1.inc src/mathlib/gen/b/rsrtnt64p1.inc --- src.orig/mathlib/gen/b/rsrtnt64p1.inc 2005-11-07 21:28:40.000000000 +0900 +++ src/mathlib/gen/b/rsrtnt64p1.inc 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,9 @@ + C2=2*C + IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. C .GT. 0) THEN + H=LOG(ABS((2*SQRT(C*P(V))+C2*V+B)/ + 1 (2*SQRT(C*P(U))+C2*U+B)))/SQRT(C) + ELSEIF(DELTA .EQ. 0) THEN + H=ABS(LOG(ABS((C2*V+B)/(C2*U+B))))/SQRT(C) + ELSE + H=(ASIN((C2*U+B)/RTD)-ASIN((C2*V+B)/RTD))/SQRT(-C) + ENDIF diff -uNr src.orig/mathlib/gen/b/rsrtnt64p2.inc src/mathlib/gen/b/rsrtnt64p2.inc --- src.orig/mathlib/gen/b/rsrtnt64p2.inc 2005-11-07 21:28:40.000000000 +0900 +++ src/mathlib/gen/b/rsrtnt64p2.inc 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,26 @@ + IF(C .EQ. 0) THEN + IF(B .EQ. 0) THEN + H=LOG(ABS(V/U))/SQRT(A) + ELSE + IF(A .LT. 0) THEN + H=2*(ATAN(SQRT(-(A+B*V)/A))-ATAN(SQRT(-(A+B*U)/A)))/SQRT(-A) + ELSE + WA=SQRT(A) + WU=SQRT(A+B*U) + WV=SQRT(A+B*V) + H=LOG(ABS((WV-WA)*(WU+WA)/((WV+WA)*(WU-WA))))/WA + ENDIF + ENDIF + ELSE + A2=2*A + IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. A .GT. 0) THEN + H=LOG(ABS((-2*SQRT(A*P(V))+B*V+A2)*U/ + 1 ((-2*SQRT(A*P(U))+B*U+A2)*V)))/SQRT(A) + ELSEIF(DELTA .EQ. 0) THEN + H=LOG(ABS((B*U+A2)*V/((B*V+A2)*U)))/SQRT(A) + IF(U*V .GT. 0) H=SIGN(H,U) + ELSE + H=(ASIN((B*V+A2)/(V*RTD))-ASIN((B*U+A2)/(U*RTD)))/SQRT(-A) + IF(U .LT. 0 .AND. V .LT. 0) H=-H + ENDIF + ENDIF diff -uNr src.orig/mathlib/gen/c/celfun64.F src/mathlib/gen/c/celfun64.F --- src.orig/mathlib/gen/c/celfun64.F 1997-12-16 01:18:35.000000000 +0900 +++ src/mathlib/gen/c/celfun64.F 2005-11-07 21:28:40.000000000 +0900 @@ -64,7 +64,11 @@ #if ! defined(CERNLIB_QFPGF77) DATA AM0 /-1D20/ +#if !defined(CERNLIB_GFORTRAN) SAVE AM0,C,A,L,BIGK +#else + SAVE +#endif #endif #if !defined(CERNLIB_QF2C) diff -uNr src.orig/mathlib/gen/c/wpsipg.F src/mathlib/gen/c/wpsipg.F --- src.orig/mathlib/gen/c/wpsipg.F 1996-04-02 00:02:01.000000000 +0900 +++ src/mathlib/gen/c/wpsipg.F 2005-11-07 21:28:40.000000000 +0900 @@ -62,7 +62,11 @@ H=0 WRITE(ERRTXT,101) K CALL MTLPRT(NAME,'C317.1',ERRTXT) +#if !defined(CERNLIB_GFORTRAN) ELSEIF(ABS(IMAG(U)) .LT. DELTA .AND. ABS(X+NINT(A)) .LT. DELTA) +#else + ELSEIF(ABS(AIMAG(U)) .LT. DELTA .AND. ABS(X+NINT(A)) .LT. DELTA) +#endif 1 THEN H=0 WRITE(ERRTXT,102) X @@ -88,7 +92,11 @@ IF(X .LT. 0) THEN V=PI*U X=V +#if !defined(CERNLIB_GFORTRAN) Y=IMAG(V) +#else + Y=AIMAG(V) +#endif A=SIN(X) B=COS(X) T=TANH(Y) diff -uNr src.orig/mathlib/gen/d/cfstft.F src/mathlib/gen/d/cfstft.F --- src.orig/mathlib/gen/d/cfstft.F 1997-12-16 01:18:42.000000000 +0900 +++ src/mathlib/gen/d/cfstft.F 2005-11-07 21:28:40.000000000 +0900 @@ -43,7 +43,7 @@ W=CMPLX(C,S) U=W C=SQRT(0.5*C+0.5) -#if defined(CERNLIB_QFPGF77) +#if defined(CERNLIB_QFPGF77) || defined(CERNLIB_GFORTRAN) S=AIMAG(W)/(C+C) #else S=IMAG(W)/(C+C) diff -uNr src.orig/mathlib/gen/tests/b300m.F src/mathlib/gen/tests/b300m.F --- src.orig/mathlib/gen/tests/b300m.F 1996-04-02 00:01:13.000000000 +0900 +++ src/mathlib/gen/tests/b300m.F 2005-11-07 21:28:40.000000000 +0900 @@ -66,9 +66,18 @@ #endif D=RES-TST LTEST = LTEST .AND. ABS(D) .LE.1D-7 +* +* gfortran hates logical in format statement:-( +* +#if defined(CERNLIB_GFORTRAN) + IF(ABS(D) .GT. 1D-7) + 1 WRITE(LOUT,'(1X,2I5,F10.1,3F7.1,2F8.4,3F15.8,'' LB'',L2)') + 2 K,N,DELTA,A,B,C,U,V,RES,TST,D,LRL +#else IF(ABS(D) .GT. 1D-7) 1 WRITE(LOUT,'(1X,2I5,F10.1,3F7.1,2F8.4,3F15.8,'' LB'',I2,L2)') 2 K,N,DELTA,A,B,C,U,V,RES,TST,D,LRL +#endif ENDIF 2 CONTINUE ENDIF diff -uNr src.orig/mathlib/gen/tests/c327m.F src/mathlib/gen/tests/c327m.F --- src.orig/mathlib/gen/tests/c327m.F 1996-04-02 00:01:17.000000000 +0900 +++ src/mathlib/gen/tests/c327m.F 2005-11-07 21:28:40.000000000 +0900 @@ -92,7 +92,11 @@ #endif ENDIF WRITE(Z,'(2D26.16)') H,T +#if defined(CERNLIB_MACOSX) + READ(Z,'(2(4X,D22.16))') H1,T1 +#else READ(Z,'(2(D22.16,4X))') H1,T1 +#endif IF(IDS .EQ. 1) THEN ERRMAX=MAX(ERRMAX,ABS(H1-T1)) LTEST= LTEST .AND. ERRMAX .LE. TSTERR diff -uNr src.orig/mathlib/gen/tests/c342m.F src/mathlib/gen/tests/c342m.F --- src.orig/mathlib/gen/tests/c342m.F 1996-04-02 00:01:19.000000000 +0900 +++ src/mathlib/gen/tests/c342m.F 2005-11-07 21:28:40.000000000 +0900 @@ -70,7 +70,11 @@ #endif END IF WRITE(Z,'(2D26.16)') R,T +#if defined(CERNLIB_MACOSX) + READ(Z,'(2(4X,D22.16))') R1,T1 +#else READ(Z,'(2(D22.16,4X))') R1,T1 +#endif ERMAX= MAX(ERMAX,ABS(R1-T1)) IF(IDS .EQ. 3 .OR. IDS .EQ. 4) THEN WRITE(LOUT,'(1X,F10.3,2F25.16,1P,D10.1)') SX,R,T,ABS(R1-T1) diff -uNr src.orig/mathlib/gen/v/v107z0.inc src/mathlib/gen/v/v107z0.inc --- src.orig/mathlib/gen/v/v107z0.inc 2000-06-08 18:57:22.000000000 +0900 +++ src/mathlib/gen/v/v107z0.inc 2005-11-07 21:28:40.000000000 +0900 @@ -17,7 +17,11 @@ * #if defined(CERNLIB_LNX)||defined(CERNLIB_ALLIANT)||defined(CERNLIB_DECS)||defined(CERNLIB_MACMPW)||defined(CERNLIB_SGI) +#if !defined(CERNLIB_GFORTRAN) DATA IZ0/'33000000'X/ +#else + DATA IZ0/X'33000000'/ +#endif #elif defined(CERNLIB_APOLLO) DATA IZ0/16#33000000/ diff -uNr src.orig/mclibs/ariadne/test/test.F src/mclibs/ariadne/test/test.F --- src.orig/mclibs/ariadne/test/test.F 1996-03-29 01:15:44.000000000 +0900 +++ src/mclibs/ariadne/test/test.F 2005-11-07 21:28:40.000000000 +0900 @@ -15,7 +15,17 @@ C...Performs various tests on Ariadne EXTERNAL LUDATA,PYDATA +#if defined(CERNLIB_GFORTRAN) + call dummysub(ludata) + call dummysub(pydata) + call dummysub(ardata) +#endif IPRINT=0 CALL ARTEST(IPRINT) END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/cojets/code/Imakefile src/mclibs/cojets/code/Imakefile --- src.orig/mclibs/cojets/code/Imakefile 1996-01-11 23:14:45.000000000 +0900 +++ src/mclibs/cojets/code/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -20,7 +20,11 @@ wpardn.F wpsqz.F wrad.F writeb.F writeh.F x1exp.F z0rad.F zdang.F \ @@\ zdecay.F zdecif.F zgen.F zgens.F zlim.F zlimsy.F zpsqz.F +#if !defined(CERNLIB_GFORTRAN) FORTRANSAVEOPTION = FortranSaveFlags +#else +FORTRANSAVEOPTION = -fno-automatic +#endif #ifdef CERNLIB_IBMRT SpecialFortranLibObjectRule(jetqcd,jetqcd,NullParameter,NullParameter) diff -uNr src.orig/mclibs/cojets/cojdata/Imakefile src/mclibs/cojets/cojdata/Imakefile --- src.orig/mclibs/cojets/cojdata/Imakefile 1996-01-11 23:15:01.000000000 +0900 +++ src/mclibs/cojets/cojdata/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -1,6 +1,10 @@ SRCS_F= \ @@\ cojver.F data.F +#if !defined(CERNLIB_GFORTRAN) FORTRANSAVEOPTION = FortranSaveFlags +#else +FORTRANSAVEOPTION = -fno-automatic +#endif SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/mclibs/cojets/cojtapew/Imakefile src/mclibs/cojets/cojtapew/Imakefile --- src.orig/mclibs/cojets/cojtapew/Imakefile 1996-01-11 23:15:04.000000000 +0900 +++ src/mclibs/cojets/cojtapew/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -2,6 +2,10 @@ bookh.F bufout.F edit.F fillh.F ichcnv.F isbosf.F isjtpf.F isjtqf.F \ @@\ outh.F pptcl.F wgens.F wrbeg.F wrend.F wrtape.F +#if !defined(CERNLIB_GFORTRAN) FORTRANSAVEOPTION = FortranSaveFlags +#else +FORTRANSAVEOPTION = -fno-automatic +#endif SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/mclibs/cojets/test/test.F src/mclibs/cojets/test/test.F --- src.orig/mclibs/cojets/test/test.F 1996-03-25 21:53:36.000000000 +0900 +++ src/mclibs/cojets/test/test.F 2005-11-07 21:28:40.000000000 +0900 @@ -2,12 +2,20 @@ PROGRAM COJETST CHARACTER*(*) DFILE +#if !defined(CERNLIB_GFORTRAN) EXTERNAL COJDAT +#else + EXTERNAL COJDAT, COJVER +#endif #if defined(CERNLIB_IBMVM) PARAMETER (DFILE='/COJETS DATA *') #else PARAMETER (DFILE='cojets.dat') #endif +#if defined(CERNLIB_GFORTRAN) + call dummysub(cojdat) + call dummysub(cojver) +#endif C C MAIN PROGRAM FOR COJETS C @@ -25,3 +33,8 @@ CALL COJETS(-1,-2,5,6) C END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/fritiof/test/fritioft.F src/mclibs/fritiof/test/fritioft.F --- src.orig/mclibs/fritiof/test/fritioft.F 1996-01-11 23:05:30.000000000 +0900 +++ src/mclibs/fritiof/test/fritioft.F 2005-11-07 21:28:40.000000000 +0900 @@ -1,3 +1,16 @@ external ludata, pydata +#if defined(CERNLIB_GFORTRAN) + external frdata, ardata + + call dummysub(ludata) + call dummysub(pydata) + call dummysub(frdata) + call dummysub(ardata) +#endif call frsample end +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/herwig/code/hwhiga.F src/mclibs/herwig/code/hwhiga.F --- src.orig/mclibs/herwig/code/hwhiga.F 1996-12-03 23:16:56.000000000 +0900 +++ src/mclibs/herwig/code/hwhiga.F 2005-11-07 21:28:40.000000000 +0900 @@ -73,7 +73,11 @@ TAMP(7)=HWHIG5(U,T,S,EMH2,EMQ2,3,0,6,0,0,0) DO 20 I=1,7 TAMPI(I)= REAL(TAMP(I)) +#if !defined(CERNLIB_GFORTRAN) 20 TAMPR(I)=-IMAG(TAMP(I)) +#else + 20 TAMPR(I)=-AIMAG(TAMP(I)) +#endif C Square and add prefactors WTGG=0.03125*FLOAT(NCOLO*(NCOLO**2-1)) & *(TAMPR(1)**2+TAMPI(1)**2+TAMPR(2)**2+TAMPI(2)**2 diff -uNr src.orig/mclibs/herwig/code/hwuli2.F src/mclibs/herwig/code/hwuli2.F --- src.orig/mclibs/herwig/code/hwuli2.F 1996-12-03 23:17:04.000000000 +0900 +++ src/mclibs/herwig/code/hwuli2.F 2005-11-07 21:28:40.000000000 +0900 @@ -19,7 +19,11 @@ PROD(Y,Y2)=Y*(ONE+A1*Y*(ONE+A2*Y*(ONE+A3*Y2*(ONE+A4*Y2*(ONE+A5*Y2* & (ONE+A6*Y2*(ONE+A7*Y2*(ONE+A8*Y2*(ONE+A9*Y2*(ONE+A10*Y2)))))))))) XR=REAL(X) +#if !defined(CERNLIB_GFORTRAN) XI=IMAG(X) +#else + XI=AIMAG(X) +#endif R2=XR*XR+XI*XI IF (R2.GT.ONE.AND.(XR/R2).GT.HALF) THEN Z=-LOG(ONE/X) diff -uNr src.orig/mclibs/herwig/test/test.F src/mclibs/herwig/test/test.F --- src.orig/mclibs/herwig/test/test.F 1996-12-12 17:50:14.000000000 +0900 +++ src/mclibs/herwig/test/test.F 2005-11-07 21:28:40.000000000 +0900 @@ -5,6 +5,9 @@ C force inclusion of black data EXTERNAL HWUDAT +#if defined(CERNLIB_GFORTRAN) + call dummysub(hwudat) +#endif C C---MAX NUMBER OF EVENTS THIS RUN MAXEV=100 @@ -77,3 +80,8 @@ C---------------------------------------------------------------------- END C----------------------------------------------------------------------- +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/isajet/code/sigqcd.F src/mclibs/isajet/code/sigqcd.F --- src.orig/mclibs/isajet/code/sigqcd.F 1996-12-05 02:38:26.000000000 +0900 +++ src/mclibs/isajet/code/sigqcd.F 2005-11-07 21:28:40.000000000 +0900 @@ -213,7 +213,11 @@ 250 CONTINUE C C Gluon + heavy quark +#if !defined(CERNLIB_GFORTRAN) DO 300 IQ=8,13. +#else + DO 300 IQ=8,13 +#endif IF(.NOT.(GOQ(1,1).AND.GOQ(IQ,2))) GO TO 310 AMQ=AMASS(IQ/2) AM2=AMQ**2 diff -uNr src.orig/mclibs/isajet/test/isajett.F src/mclibs/isajet/test/isajett.F --- src.orig/mclibs/isajet/test/isajett.F 1997-03-15 02:32:39.000000000 +0900 +++ src/mclibs/isajet/test/isajett.F 2005-11-07 21:28:40.000000000 +0900 @@ -14,6 +14,9 @@ C C MAIN PROGRAM FOR ISAJET C +#if defined(CERNLIB_GFORTRAN) + call dummysub(aldata) +#endif OPEN(1,FILE=DFILE,STATUS='OLD') #if defined(CERNLIB_IBMVM) OPEN(2,STATUS='SCRATCH',FORM='UNFORMATTED') @@ -33,3 +36,8 @@ END SUBROUTINE EXIT END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/jetset/jetset/Imakefile src/mclibs/jetset/jetset/Imakefile --- src.orig/mclibs/jetset/jetset/Imakefile 1998-09-26 00:55:08.000000000 +0900 +++ src/mclibs/jetset/jetset/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -11,7 +11,7 @@ FORTRANSAVEOPTION = FortranSaveFlags #if defined(CERNLIB_PPC) -FDEBUGFLAGS := $(FDEBUGFLAGS) -O0 +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 #endif SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/mclibs/jetset/pythia/Imakefile src/mclibs/jetset/pythia/Imakefile --- src.orig/mclibs/jetset/pythia/Imakefile 2001-04-04 23:54:39.000000000 +0900 +++ src/mclibs/jetset/pythia/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -15,4 +15,8 @@ FDEBUGFLAGS := $(FDEBUGFLAGS) -Nn15000 #endif +#if defined(CERNLIB_PPC) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/mclibs/jetset/test/test.F src/mclibs/jetset/test/test.F --- src.orig/mclibs/jetset/test/test.F 1996-03-09 02:32:29.000000000 +0900 +++ src/mclibs/jetset/test/test.F 2005-11-07 21:28:40.000000000 +0900 @@ -1,6 +1,10 @@ PROGRAM JETTST C EXTERNAL LUDATA,PYDATA +#if defined(CERNLIB_GFORTRAN) + call dummysub(ludata) + call dummysub(pydata) +#endif MPAR = 1 C @@ -8,3 +12,8 @@ CALL PYTEST(MPAR) C END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/lepto63/test/demo.F src/mclibs/lepto63/test/demo.F --- src.orig/mclibs/lepto63/test/demo.F 2002-12-02 20:05:18.000000000 +0900 +++ src/mclibs/lepto63/test/demo.F 2005-11-07 21:28:40.000000000 +0900 @@ -42,7 +42,12 @@ DATA PE/20*820.0/ DATA LE/20*-27.5/ C - EXTERNAL LUDATA,PYDATA + EXTERNAL LUDATA,PYDATA,LEPTOD +#if defined(CERNLIB_GFORTRAN) + call dummysub(ludata) + call dummysub(pydata) + call dummysub(leptod) +#endif C...Set cuts LST(3)=0 CUT(7)=100. @@ -108,3 +113,8 @@ RETURN END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/lepto63/test/demo2.F src/mclibs/lepto63/test/demo2.F --- src.orig/mclibs/lepto63/test/demo2.F 2002-12-02 20:05:19.000000000 +0900 +++ src/mclibs/lepto63/test/demo2.F 2005-11-07 21:28:40.000000000 +0900 @@ -7,7 +7,12 @@ COMMON/LUJETS/N,K(4000,5),P(4000,5),V(4000,5) DATA NPRINT/10/,NEVENT/100/ C - EXTERNAL LUDATA,PYDATA + EXTERNAL LUDATA,PYDATA,LEPTOD +#if defined(CERNLIB_GFORTRAN) + call dummysub(ludata) + call dummysub(pydata) + call dummysub(leptod) +#endif C...Settings CUT(5)=10. CUT(7)=25. @@ -45,3 +50,8 @@ RETURN END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/mclibs/pdf/npdf/Imakefile src/mclibs/pdf/npdf/Imakefile --- src.orig/mclibs/pdf/npdf/Imakefile 2000-04-19 22:27:39.000000000 +0900 +++ src/mclibs/pdf/npdf/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -1,6 +1,10 @@ SRCS_F= eks98.F eksarp.F sfeks98.F structa.F +#if !defined(CERNLIB_GFORTRAN) FORTRANSAVEOPTION = FortranSaveFlags +#else +FORTRANSAVEOPTION = -fno-automatic +#endif #if defined(CERNLIB_QMIRIX64) EXTRA_INCLUDES=-I$(CVSCOSRC)/mclibs/pdf/pdf diff -uNr src.orig/mclibs/pdf/pdf/w5051p3.inc src/mclibs/pdf/pdf/w5051p3.inc --- src.orig/mclibs/pdf/pdf/w5051p3.inc 2000-04-19 22:27:43.000000000 +0900 +++ src/mclibs/pdf/pdf/w5051p3.inc 2005-11-07 21:28:40.000000000 +0900 @@ -24,7 +24,7 @@ PARAMETER (ND11=10,ND12= 9,ND13=100,ND14=56,ND15=14,ND16= 1, + ND17=2,ND18= 0,ND19= 0) PARAMETER (ND21= 2,ND22= 0,ND23= 3,ND24= 0,ND25= 2,ND26= 3, - + NND27=0,D28= 0,ND29= 0) + + ND27=0,ND28= 0,ND29= 0) PARAMETER (ND31= 2,ND32= 4,ND33= 4,ND34= 5,ND35= 4,ND36= 3, + ND37=0,ND38= 6,ND39= 8) PARAMETER (ND41= 1) diff -uNr src.orig/mclibs/pdf/spdf/Imakefile src/mclibs/pdf/spdf/Imakefile --- src.orig/mclibs/pdf/spdf/Imakefile 2000-04-19 22:51:56.000000000 +0900 +++ src/mclibs/pdf/spdf/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -84,7 +84,11 @@ whit6g.F whit6q.F +#if !defined(CERNLIB_GFORTRAN) FORTRANSAVEOPTION = FortranSaveFlags +#else +FORTRANSAVEOPTION = -fno-automatic +#endif #if defined(CERNLIB_QMIRIX64) EXTRA_INCLUDES=-I$(CVSCOSRC)/mclibs/pdf/pdf diff -uNr src.orig/mclibs/pythia/code/Imakefile src/mclibs/pythia/code/Imakefile --- src.orig/mclibs/pythia/code/Imakefile 2002-04-11 01:03:21.000000000 +0900 +++ src/mclibs/pythia/code/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -36,4 +36,9 @@ FDEBUGFLAGS := $(FDEBUGFLAGS) -Nn15000 #endif +#if defined(CERNLIB_PPC) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + SubdirLibraryTarget(NullParameter,NullParameter) + diff -uNr src.orig/mclibs/pythia/code/visaje.F src/mclibs/pythia/code/visaje.F --- src.orig/mclibs/pythia/code/visaje.F 2002-04-11 01:03:24.000000000 +0900 +++ src/mclibs/pythia/code/visaje.F 2005-11-07 21:28:40.000000000 +0900 @@ -7,7 +7,9 @@ FUNCTION VISAJE() IMPLICIT DOUBLE PRECISION(A-H, O-Z) IMPLICIT INTEGER(I-N) +#if !defined(CERNLIB_GFORTRAN) CHARACTER*40 VISAJE +#endif C...Commonblocks. COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200) diff -uNr src.orig/mclibs/pythia/test/test.F src/mclibs/pythia/test/test.F --- src.orig/mclibs/pythia/test/test.F 1998-04-01 01:28:48.000000000 +0900 +++ src/mclibs/pythia/test/test.F 2005-11-07 21:28:40.000000000 +0900 @@ -1,9 +1,17 @@ PROGRAM PYTST C EXTERNAL PYDATA +#if defined(CERNLIB_GFORTRAN) + call dummysub(pydata) +#endif MPAR = 1 C CALL PYTEST(MPAR) C END +#if defined(CERNLIB_GFORTRAN) + subroutine dummysub(a) + return + end +#endif diff -uNr src.orig/packlib/cspack/sysreq/log.c src/packlib/cspack/sysreq/log.c --- src.orig/packlib/cspack/sysreq/log.c 2003-09-02 21:47:16.000000000 +0900 +++ src/packlib/cspack/sysreq/log.c 2005-11-07 21:28:40.000000000 +0900 @@ -80,7 +80,7 @@ static int pid; /* process identifier */ static int logfd ; /* logging file descriptor */ #if !defined(SOLARIS) && !defined(linux) && !defined(_AIX) \ - && !defined(IRIX5) && !defined(apollo) + && !defined(IRIX5) && !defined(apollo) && !defined(__DARWIN__) extern int syslog(); #endif /* !SOLARIS && !IRIX5 && !apollo && !linux && !AIX */ extern char *getenv(); diff -uNr src.orig/packlib/cspack/tcpaw/tcpaw.c src/packlib/cspack/tcpaw/tcpaw.c --- src.orig/packlib/cspack/tcpaw/tcpaw.c 2005-04-19 00:39:28.000000000 +0900 +++ src/packlib/cspack/tcpaw/tcpaw.c 2005-11-07 21:40:59.000000000 +0900 @@ -2270,6 +2270,13 @@ #else strcpy(buf, "DOT.NETRC"); #endif + +#if defined(__APPLE__) || __GNUC__ > 3 +static rnetrc(char *host, char **aname, char **apass); +static token(); +static void catch(); +#endif + cfile = fopen(buf, "r"); if (cfile == NULL) { @@ -2359,6 +2366,13 @@ } #endif + +#if defined(__APPLE__) || __GNUC__ > 3 +static rnetrc(char *host, char **aname, char **apass); +static token(); +static void catch(); +#endif + #include #include @@ -2370,11 +2384,11 @@ char *ku_pros( /* char *prompt, char *default */ ); char *ku_prop( /* char *prompt */ ); -/* Fails with gcc 3.4.3 #ifndef _WIN32 +#if __GNUC__ < 4 char *malloc(), *index(), *getpass(), *getuid(); #endif - */ +#endif static FILE *cfile; @@ -2541,7 +2555,7 @@ #if !defined(IBM) && !defined(_WIN32) /* I provide "getpass" myself as standard version truncates to 8 characters */ #include -#ifdef CBREAK +#if defined(CBREAK) || defined(__APPLE__) #define BSDTTY /* First find out if BSD or SYSV terminal handling.. */ #endif @@ -2551,10 +2565,9 @@ #include #endif -/* Fails with gcc 3.4.3 -#ifndef __convexc__ +#if !defined(__convexc__) && !defined(__APPLE__) && __GNUC__ < 4 extern int kill(), ioctl(), getpid(); -#endif */ /* __convexc__ */ +#endif /* __convexc__ */ static int intrupt; /*** NOTE MAXPASSWD IS DEFINED AS 8 IN ALL STANDARD UNIX SYSTEMS, BUT THIS @@ -2576,7 +2589,11 @@ register int c; FILE *fi; static char pbuf[ MAXPASSWD + 1 ]; +#if !defined(__APPLE__) void (*sig)(), catch(); +#else + void (*sig)(); +#endif if((fi = fopen("/dev/tty", "r")) == NULL) return((char*)NULL); diff -uNr src.orig/packlib/hepdb/hepdb/l3bits.inc src/packlib/hepdb/hepdb/l3bits.inc --- src.orig/packlib/hepdb/hepdb/l3bits.inc 1996-02-29 01:24:06.000000000 +0900 +++ src/packlib/hepdb/hepdb/l3bits.inc 2005-11-07 21:28:40.000000000 +0900 @@ -43,7 +43,8 @@ JBIT (IZW,IZP) = IBITS (IZW,IZP-1,1) JBYT (IZW,IZP,NZB) = IBITS (IZW,IZP-1,NZB) #endif -#if defined(CERNLIB_IBM)||defined(CERNLIB_IBMRT)||defined(CERNLIB_VAX) +#if defined(CERNLIB_IBM)||defined(CERNLIB_IBMRT)||defined(CERNLIB_VAX)\ + || defined(CERNLIB_GFORTRAN) IBITS (I,N,L) = ISHFT(ISHFT(I,32-L-N),L-32) * JBIT (IZW,IZP) = IBITS (IZW,IZP-1,1) @@ -58,7 +59,7 @@ * * l3bits.inc * -#if defined(CERNLIB_F2C) +#if defined(CERNLIB_F2C) && !defined(CERNLIB_GFORTRAN) C-- C-- Note: F2C-ish RSHIFT is arithmetic right shift. C-- This means sign bits are shifted in at the high end diff -uNr src.orig/packlib/hepdb/hepdb/l3bitx.inc src/packlib/hepdb/hepdb/l3bitx.inc --- src.orig/packlib/hepdb/hepdb/l3bitx.inc 1996-02-29 01:24:06.000000000 +0900 +++ src/packlib/hepdb/hepdb/l3bitx.inc 2005-11-07 21:28:40.000000000 +0900 @@ -53,7 +53,8 @@ * * l3bitx.inc * -#if defined(CERNLIB_IBM)||defined(CERNLIB_IBMRT)||defined(CERNLIB_VAX) +#if defined(CERNLIB_IBM)||defined(CERNLIB_IBMRT)||defined(CERNLIB_VAX)\ + || defined(CERNLIB_GFORTRAN) #include "hepdb/l3bits.inc" MSBIT (MZ,IZW,IZP) = IOR (IAND (IZW, NOT(ISHFT(1,IZP-1)) ) + , ISHFT(IAND(MZ,1),IZP-1)) @@ -72,7 +73,7 @@ * * l3bitx.inc * -#if defined(CERNLIB_F2C) +#if defined(CERNLIB_F2C) && !defined(CERNLIB_GFORTRAN) #include "hepdb/l3bits.inc" JBYTET (MZ,IZW,IZP,NZB) = AND (MZ, + ishftr (LSHIFT(IZW,33-IZP-NZB),32-NZB) ) diff -uNr src.orig/packlib/kernlib/kernbit/z268/systems.c src/packlib/kernlib/kernbit/z268/systems.c --- src.orig/packlib/kernlib/kernbit/z268/systems.c 1998-08-25 21:45:56.000000000 +0900 +++ src/packlib/kernlib/kernbit/z268/systems.c 2005-11-07 21:28:40.000000000 +0900 @@ -200,7 +200,7 @@ || defined(_IBMR2) \ || defined(__convexc__) \ || defined(_OSK) \ -|| defined(__linux) || defined(__FreeBSD__) +|| defined(__linux) || defined(__FreeBSD__) || defined(__DARWIN__) void systems_( command, buf, buflen, l, chars, rc, ovflw ) diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_cbyt.inc src/packlib/kernlib/kerngen/kerngen/q_cbyt.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_cbyt.inc 1996-02-16 02:49:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_cbyt.inc 2005-11-07 21:28:40.000000000 +0900 @@ -9,7 +9,7 @@ * * q_cbyt.inc * -#if defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) MCBYT (MZ,IZQ,IZW,IZP,NZB) = OR ( + AND (IZW, NOT(LSHIFT (ISHFTR(NOT(0),32-NZB),IZP-1))) + ,ISHFTR (LSHIFT(LSHIFT(MZ,IZQ-1),32-NZB), 33-IZP-NZB)) @@ -21,4 +21,8 @@ MCBYT (MZ,IZQ,IZW,IZP,NZB) = IOR ( + IAND (IZW, NOT(ISHFT (ISHFT(NOT(0),-32+NZB), IZP-1))) + , ISHFT (ISHFT(ISHFT(MZ,-IZQ+1),32-NZB), -33+IZP+NZB) ) +#elif defined(CERNLIB_GFORTRAN) + MCBYT (MZ,IZQ,IZW,IZP,NZB) = IOR ( + + IAND (IZW, NOT(ISHFT (ISHFT(NOT(0),-32+NZB), IZP-1))) + + , ISHFT (ISHFT(ISHFT(MZ,IZQ-1),32-NZB), -33+IZP+NZB) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_isabit.inc src/packlib/kernlib/kerngen/kerngen/q_isabit.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_isabit.inc 1996-02-16 02:49:20.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_isabit.inc 2005-11-07 21:28:40.000000000 +0900 @@ -9,9 +9,14 @@ * * q_isabit.inc * -#if defined(CERNLIB_QMLNX)||(defined(CERNLIB_QMDOS)&&defined(CERNLIB_QF_F2C)) +#if (defined(CERNLIB_QMLNX)&&!defined(CERNLIB_GFORTRAN))||(defined(CERNLIB_QMDOS)&&defined(CERNLIB_QF_F2C)) BTEST(IZW,IZP) = AND (IZW,LSHIFT(1,IZP)) .NE. 0 IBSET(IZW,IZP) = OR (IZW,LSHIFT(1,IZP)) IBCLR(IZW,IZP) = AND (IZW,NOT(LSHIFT(1,IZP))) IBITS (IZW,IZP,NZB) = ISHFTR (LSHIFT(IZW,32-IZP-NZB), 32-NZB) +#elsif defined(CERNLIB_GFORTRAN) + BTEST(IZW,IZP) = IAND (IZW,ISHFT(1,IZP)) .NE. 0 + IBSET(IZW,IZP) = IOR (IZW,ISHFT(1,IZP)) + IBCLR(IZW,IZP) = IAND (IZW,NOT(ISHFT(1,IZP))) + IBITS (IZW,IZP,NZB) = ISHFT(ISHFT(IZW,32-NZB-IZP),NZB-32) #endif diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_jbit.inc src/packlib/kernlib/kerngen/kerngen/q_jbit.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_jbit.inc 1997-02-05 02:35:39.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_jbit.inc 2005-11-07 21:28:40.000000000 +0900 @@ -15,7 +15,7 @@ * * q_jbit.inc * -#if defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) JBIT(IZW,IZP) = AND(ISHFTR(IZW,IZP-1),1) JBYT(IZW,IZP,NZB) = ISHFTR(LSHIFT(IZW,33-IZP-NZB),32-NZB) #elif defined(CERNLIB_QMDOS)&&defined(CERNLIB_QF_F2C) @@ -28,7 +28,8 @@ #elif defined(CERNLIB_QMOS9)||defined(CERNLIB_QMHPX) JBIT (IZW,IZP) = IBITS (IZW,IZP-1,1) JBYT (IZW,IZP,NZB) = IBITS (IZW,IZP-1,NZB) -#elif defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C)) || defined(CERNLIB_QFMSOFT) +#elif (defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT)\ + || defined(CERNLIB_GFORTRAN) JBIT (IZW,IZP) = IAND (ISHFT(IZW,1-IZP), 1) JBYT (IZW,IZP,NZB) = ISHFT (ISHFT(IZW,33-IZP-NZB), -32+NZB) #endif diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_jbytet.inc src/packlib/kernlib/kerngen/kerngen/q_jbytet.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_jbytet.inc 1997-02-05 02:35:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_jbytet.inc 2005-11-07 21:28:40.000000000 +0900 @@ -25,7 +25,7 @@ + LSHIFT(NOT(MZ),32-NZB), 33-IZP-NZB))) MBYTOR (MZ,IZW,IZP,NZB) = OR (IZW, lrshft ( + LSHIFT(MZ,32-NZB), 33-IZP-NZB)) -#if defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) JBYTET (MZ,IZW,IZP,NZB) = AND (MZ, + ISHFTR (LSHIFT(IZW,33-IZP-NZB),32-NZB) ) JBYTOR (MZ,IZW,IZP,NZB) = OR (MZ, @@ -50,7 +50,8 @@ + ISHFT(NOT(MZ),32-NZB),-33+IZP+NZB)) ) MBYTOR (MZ,IZW,IZP,NZB) = IOR (IZW, ishft ( + ISHFT(MZ,32-NZB),-33+IZP+NZB) ) -#elif defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C)) || defined(CERNLIB_QFMSOFT) +#elif (defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT)\ + || defined(CERNLIB_GFORTRAN) JBYTET (MZ,IZW,IZP,NZB) = IAND (MZ, + ISHFT (ISHFT(IZW,33-IZP-NZB),-32+NZB) ) JBYTOR (MZ,IZW,IZP,NZB) = IOR (MZ, diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_sbit.inc src/packlib/kernlib/kerngen/kerngen/q_sbit.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_sbit.inc 1997-02-05 02:35:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_sbit.inc 2005-11-07 21:28:40.000000000 +0900 @@ -15,7 +15,7 @@ * * q_sbit.inc * -#if defined(CERNLIB_QMSUN)||defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMSUN)||(defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) MSBIT0 (IZW,IZP) = AND (IZW, NOT(LSHIFT(1,IZP-1)) ) MSBIT1 (IZW,IZP) = OR (IZW, LSHIFT(1,IZP-1) ) MSBIT (MZ,IZW,IZP) = OR (AND (IZW, NOT(LSHIFT(1,IZP-1)) ) @@ -25,7 +25,7 @@ MSBIT1 (IZW,IZP) = OR (IZW, LSHIFT(1,IZP-1) ) MSBIT (MZ,IZW,IZP) = OR (AND (IZW, NOT(LSHIFT(1,IZP-1)) ) + , LSHIFT(AND(MZ,1),IZP-1)) -#elif defined(CERNLIB_QMOS9)||defined(CERNLIB_QMHPX)||(defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT) +#elif defined(CERNLIB_QMOS9)||defined(CERNLIB_QMHPX)||(defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT) || defined(CERNLIB_GFORTRAN) MSBIT0 (IZW,IZP) = IAND (IZW, NOT(ISHFT(1,IZP-1)) ) MSBIT1 (IZW,IZP) = IOR (IZW, ISHFT(1,IZP-1) ) MSBIT (MZ,IZW,IZP) = IOR (IAND (IZW, NOT(ISHFT(1,IZP-1)) ) diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_sbyt.inc src/packlib/kernlib/kerngen/kerngen/q_sbyt.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_sbyt.inc 1997-09-02 23:26:58.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_sbyt.inc 2005-11-07 21:28:40.000000000 +0900 @@ -18,7 +18,7 @@ * * q_sbyt.inc * -#if defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) MSBYT (MZ,IZW,IZP,NZB) = OR ( + AND (IZW, NOT(LSHIFT (ISHFTR(NOT(0),32-NZB),IZP-1))) + ,ISHFTR (LSHIFT(MZ,32-NZB), 33-IZP-NZB) ) @@ -26,7 +26,7 @@ C MSBYT (MZ,IZW,IZP,NZB) = OR ( C + AND (IZW, NOT(LSHIFT (ISHFTR(NOT(0),32-NZB), IZP-1))) C + , ISHFTR (LSHIFT(MZ,32-NZB), 33-IZP-NZB) ) -#elif defined(CERNLIB_QMOS9)||defined(CERNLIB_QMHPX)||(defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT) || defined(CERNLIB_QFDEC) +#elif defined(CERNLIB_QMOS9)||defined(CERNLIB_QMHPX)||(defined(CERNLIB_QMDOS)&&(!defined(CERNLIB_QF_F2C))) || defined(CERNLIB_QFMSOFT) || defined(CERNLIB_QFDEC) || defined(CERNLIB_GFORTRAN) MSBYT (MZ,IZW,IZP,NZB) = IOR ( + IAND (IZW, NOT(ISHFT (ISHFT(NOT(0),-32+NZB), IZP-1))) + , ISHFT (ISHFT(MZ,32-NZB), -33+IZP+NZB) ) diff -uNr src.orig/packlib/kernlib/kerngen/kerngen/q_shift.inc src/packlib/kernlib/kerngen/kerngen/q_shift.inc --- src.orig/packlib/kernlib/kerngen/kerngen/q_shift.inc 1996-03-06 02:04:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/kerngen/q_shift.inc 2005-11-07 21:28:40.000000000 +0900 @@ -26,7 +26,7 @@ ISHFTL(IZW,NZB) = LSHIFT(IZW,NZB) C ISHFTR(IZW,NZB) = RSHIFT(IZW,NZB) C ISHFT(IZW,NZB) = LSHIFT(IZW,NZB) -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) ISHFTL (IZW,NZB) = LSHIFT (IZW,NZB) #elif 1 ISHFTL (IZW,NZB) = ISHFT (IZW, NZB) diff -uNr src.orig/packlib/kernlib/kerngen/tcgen/ibits.F src/packlib/kernlib/kerngen/tcgen/ibits.F --- src.orig/packlib/kernlib/kerngen/tcgen/ibits.F 1996-02-16 02:49:44.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgen/ibits.F 2005-11-07 21:28:40.000000000 +0900 @@ -9,7 +9,7 @@ #include "kerngen/pilot.h" #if defined(CERNLIB_QMDOS) #include "dosgs/ibits.F" -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) #include "lnxgs/ibits.F" #elif !defined(CERNLIB_QMILSTD) FUNCTION IBITS(I,N,L) diff -uNr src.orig/packlib/kernlib/kerngen/tcgen/kerngt.F src/packlib/kernlib/kerngen/tcgen/kerngt.F --- src.orig/packlib/kernlib/kerngen/tcgen/kerngt.F 1997-02-05 02:36:16.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgen/kerngt.F 2005-11-07 21:28:40.000000000 +0900 @@ -19,7 +19,7 @@ #include "hpxgs/kerngt.F" #elif defined(CERNLIB_QMIRT)||defined(CERNLIB_QMIRTD) #include "irtgs/kerngt.F" -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) #include "lnxgs/kerngt.F" #elif defined(CERNLIB_QMSGI) #include "sgigs/kerngt.F" diff -uNr src.orig/packlib/kernlib/kerngen/tcgen/utrans.F src/packlib/kernlib/kerngen/tcgen/utrans.F --- src.orig/packlib/kernlib/kerngen/tcgen/utrans.F 1996-02-16 02:49:50.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgen/utrans.F 2005-11-07 21:28:40.000000000 +0900 @@ -7,7 +7,7 @@ * * #include "kerngen/pilot.h" -#if defined(CERNLIB_QMLNX) +#if defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) #include "lnxgs/utrans.F" #else SUBROUTINE UTRANS (AI,AJ,NCH,IP,JP) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/cbyt.F src/packlib/kernlib/kerngen/tcgens/cbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/cbyt.F 1996-02-16 02:50:10.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/cbyt.F 2005-11-07 21:28:40.000000000 +0900 @@ -9,7 +9,7 @@ #include "kerngen/pilot.h" #if defined(CERNLIB_QMSUN) #include "sungs/cbyt.F" -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) #include "lnxgs/cbyt.F" #else SUBROUTINE CBYT (M,LM,IX,LX,NB) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/iucomh.F src/packlib/kernlib/kerngen/tcgens/iucomh.F --- src.orig/packlib/kernlib/kerngen/tcgens/iucomh.F 1997-02-05 02:36:24.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/iucomh.F 2005-11-07 21:28:40.000000000 +0900 @@ -19,8 +19,10 @@ #include "dosgs/iucomh.F" #elif defined(CERNLIB_QMVAOS)||defined(CERNLIB_QMVMI) #include "allgs/iucomh.F" -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) #include "lnxgs/iucomh.F" #elif defined(CERNLIB_QMVAX) #include "vaxgs/iucomh.F" +#elif defined(CERNLIB_GFORTRAN) +#include "allgs/iucomh.F" #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/jbit.F src/packlib/kernlib/kerngen/tcgens/jbit.F --- src.orig/packlib/kernlib/kerngen/tcgens/jbit.F 1996-02-16 02:50:11.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/jbit.F 2005-11-08 16:49:44.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) JBIT = IAND (ISHFTR(IZW, IZP-1), 1) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) JBIT = IAND (ISHFT (IZW,-IZP+1), 1) #endif #if defined(CERNLIB_QMILSTD) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/jbyt.F src/packlib/kernlib/kerngen/tcgens/jbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/jbyt.F 1996-02-16 02:50:11.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/jbyt.F 2005-11-08 17:14:14.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) JBYT = ISHFTR(ISHFTL(IZW,NBITPW+1-IZP-NZB), NBITPW-NZB) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) JBYT = ISHFT (ISHFT (IZW,NBITPW+1-IZP-NZB),-NBITPW+NZB) #endif #if defined(CERNLIB_QMILSTD) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/jbytet.F src/packlib/kernlib/kerngen/tcgens/jbytet.F --- src.orig/packlib/kernlib/kerngen/tcgens/jbytet.F 1996-02-16 02:50:11.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/jbytet.F 2005-11-08 17:15:26.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) JBYTET = IAND (MZ, ISHFTR(ISHFTL(IZW,NBITPW+1-IZP-NZB), + NBITPW-NZB) ) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) JBYTET = IAND (MZ, ISHFT (ISHFT (IZW,NBITPW+1-IZP-NZB), + -NBITPW+NZB) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/jbytor.F src/packlib/kernlib/kerngen/tcgens/jbytor.F --- src.orig/packlib/kernlib/kerngen/tcgens/jbytor.F 1996-02-16 02:50:12.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/jbytor.F 2005-11-08 17:16:26.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) JBYTOR = IOR (MZ, ISHFTR(ISHFTL(IZW,NBITPW+1-IZP-NZB), + NBITPW-NZB) ) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) JBYTOR = IOR (MZ, ISHFT (ISHFT (IZW,NBITPW+1-IZP-NZB), + -NBITPW+NZB) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/lnxgs/ublow.F src/packlib/kernlib/kerngen/tcgens/lnxgs/ublow.F --- src.orig/packlib/kernlib/kerngen/tcgens/lnxgs/ublow.F 1996-02-16 02:50:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/lnxgs/ublow.F 2005-11-07 22:08:41.000000000 +0900 @@ -18,8 +18,13 @@ NCH = NCHP(1) IF (NCH) 91, 29, 11 +#if !defined(CERNLIB_GFORTRAN) 11 NWS = ishftr (NCH,2) NTRAIL = AND (NCH,3) +#else + 11 NWS = ishft (NCH,-2) + NTRAIL = iAND (NCH,3) +#endif JT = 0 IF (NWS.EQ.0) GO TO 26 @@ -27,10 +32,17 @@ DO 24 JS=1,NWS MWD = MS(JS) +#if !defined(CERNLIB_GFORTRAN) MT(JT+1) = OR (IBLAN1,AND(MASK1,MWD)) MT(JT+2) = OR (IBLAN1,AND(MASK1,ishftr(MWD,8))) MT(JT+3) = OR (IBLAN1,AND(MASK1,ishftr(MWD,16))) MT(JT+4) = OR (IBLAN1, ishftr(MWD,24) ) +#else + MT(JT+1) = iOR (IBLAN1,iAND(MASK1,MWD)) + MT(JT+2) = iOR (IBLAN1,iAND(MASK1,ishft(MWD,-8))) + MT(JT+3) = iOR (IBLAN1,iAND(MASK1,ishft(MWD,-16))) + MT(JT+4) = iOR (IBLAN1, ishft(MWD,-24) ) +#endif 24 JT = JT + 4 IF (NTRAIL.EQ.0) RETURN @@ -40,8 +52,13 @@ 26 MWD = MS(NWS+1) DO 28 JS=1,NTRAIL +#if !defined(CERNLIB_GFORTRAN) MT(JT+1) = OR (IBLAN1,AND(MASK1,MWD)) MWD = ishftr (MWD,8) +#else + MT(JT+1) = iOR (IBLAN1,iAND(MASK1,MWD)) + MWD = ishft (MWD,-8) +#endif 28 JT = JT + 1 29 RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/lnxgs/ubunch.F src/packlib/kernlib/kerngen/tcgens/lnxgs/ubunch.F --- src.orig/packlib/kernlib/kerngen/tcgens/lnxgs/ubunch.F 1996-02-16 02:50:20.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/lnxgs/ubunch.F 2005-11-07 22:12:35.000000000 +0900 @@ -18,19 +18,32 @@ NCH = NCHP(1) IF (NCH) 91,39,11 +#if !defined(CERNLIB_GFORTRAN) 11 NWT = ishftr (NCH,2) NTRAIL = AND (NCH,3) +#else + 11 NWT = ishft (NCH,-2) + NTRAIL = iAND (NCH,3) +#endif JS = 0 IF (NWT.EQ.0) GO TO 31 C-- Pack the initial complete words DO 24 JT=1,NWT +#if !defined(CERNLIB_GFORTRAN) MT(JT) = OR (OR (OR ( + AND(MS(JS+1),MASK1), + LSHIFT (AND(MS(JS+2),MASK1), 8)), + LSHIFT (IAND(MS(JS+3),MASK1),16)), + LSHIFT (MS(JS+4), 24) ) +#else + MT(JT) = iOR (iOR (iOR ( + + iAND(MS(JS+1),MASK1), + + iSHFT (iAND(MS(JS+2),MASK1), 8)), + + iSHFT (IAND(MS(JS+3),MASK1),16)), + + iSHFT (MS(JS+4), 24) ) +#endif 24 JS = JS + 4 IF (NTRAIL.EQ.0) RETURN @@ -41,7 +54,11 @@ JS = NCH DO 34 JT=1,NTRAIL +#if !defined(CERNLIB_GFORTRAN) MWD = OR (LSHIFT(MWD,8), AND(MS(JS),MASK1)) +#else + MWD = iOR (iSHFT(MWD,8), iAND(MS(JS),MASK1)) +#endif 34 JS = JS - 1 MT(NWT+1) = MWD 39 RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/lnxppcgs/ublow.F src/packlib/kernlib/kerngen/tcgens/lnxppcgs/ublow.F --- src.orig/packlib/kernlib/kerngen/tcgens/lnxppcgs/ublow.F 1998-09-25 18:32:12.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/lnxppcgs/ublow.F 2005-11-07 21:28:40.000000000 +0900 @@ -21,8 +21,13 @@ NCH = NCHP(1) IF (NCH) 91, 29, 11 +#if !defined(CERNLIB_GFORTRAN) 11 NWS = ishftr (NCH,2) NTRAIL = AND (NCH,3) +#else + 11 NWS = ishft (NCH,-2) + NTRAIL = iAND (NCH,3) +#endif JT = 0 IF (NWS.EQ.0) GO TO 26 @@ -30,10 +35,17 @@ DO 24 JS=1,NWS MWD = MS(JS) +#if !defined(CERNLIB_GFORTRAN) MT(JT+1) = OR (IBLAN1,AND(MASK1,MWD)) MT(JT+2) = OR (IBLAN1,AND(MASK1,LSHIFT(MWD,8))) MT(JT+3) = OR (IBLAN1,AND(MASK1,LSHIFT(MWD,16))) MT(JT+4) = OR (IBLAN1, LSHIFT(MWD,24) ) +#else + MT(JT+1) = iOR (IBLAN1,iAND(MASK1,MWD)) + MT(JT+2) = iOR (IBLAN1,iAND(MASK1,iSHFT(MWD,8))) + MT(JT+3) = iOR (IBLAN1,iAND(MASK1,iSHFT(MWD,16))) + MT(JT+4) = iOR (IBLAN1, iSHFT(MWD,24) ) +#endif 24 JT = JT + 4 IF (NTRAIL.EQ.0) RETURN @@ -43,8 +55,13 @@ 26 MWD = MS(NWS+1) DO 28 JS=1,NTRAIL +#if !defined(CERNLIB_GFORTRAN) MT(JT+1) = OR (IBLAN1,AND(MASK1,MWD)) MWD = LSHIFT (MWD,8) +#else + MT(JT+1) = iOR (IBLAN1,iAND(MASK1,MWD)) + MWD = iSHFT (MWD,8) +#endif 28 JT = JT + 1 29 RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/lnxppcgs/ubunch.F src/packlib/kernlib/kerngen/tcgens/lnxppcgs/ubunch.F --- src.orig/packlib/kernlib/kerngen/tcgens/lnxppcgs/ubunch.F 1998-09-25 18:32:14.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/lnxppcgs/ubunch.F 2005-11-07 21:28:40.000000000 +0900 @@ -21,19 +21,32 @@ NCH = NCHP(1) IF (NCH) 91,39,11 +#if !defined(CERNLIB_GFORTRAN) 11 NWT = ishftr (NCH,2) NTRAIL = AND (NCH,3) +#else + 11 NWT = ishft (NCH,-2) + NTRAIL = iAND (NCH,3) +#endif JS = 0 IF (NWT.EQ.0) GO TO 31 C-- Pack the initial complete words DO 24 JT=1,NWT +#if !defined(CERNLIB_GFORTRAN) MT(JT) = OR (OR (OR ( + AND(MS(JS+1),MASK1), + ISHFTR (AND(MS(JS+2),MASK1), 8)), + ISHFTR (IAND(MS(JS+3),MASK1),16)), + ISHFTR (MS(JS+4), 24) ) +#else + MT(JT) = iOR (iOR (iOR ( + + iAND(MS(JS+1),MASK1), + + ISHFT (iAND(MS(JS+2),MASK1), -8)), + + ISHFT (IAND(MS(JS+3),MASK1),-16)), + + ISHFT (MS(JS+4), -24) ) +#endif 24 JS = JS + 4 IF (NTRAIL.EQ.0) RETURN @@ -44,7 +57,11 @@ JS = NCH DO 34 JT=1,NTRAIL +#if !defined(CERNLIB_GFORTRAN) MWD = OR (ISHFTR(MWD,8), AND(MS(JS),MASK1)) +#else + MWD = iOR (ISHFT(MWD,-8), iAND(MS(JS),MASK1)) +#endif 34 JS = JS - 1 MT(NWT+1) = MWD 39 RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/mbytet.F src/packlib/kernlib/kerngen/tcgens/mbytet.F --- src.orig/packlib/kernlib/kerngen/tcgens/mbytet.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/mbytet.F 2005-11-08 17:17:19.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MBYTET = IAND (IZW, NOT(ISHFTR(ISHFTL(NOT(MZ),NBITPW-NZB), + NBITPW+1-IZP-NZB)) ) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MBYTET = IAND (IZW, NOT(ISHFT (ISHFT (NOT(MZ),NBITPW-NZB), + -NBITPW-1+IZP+NZB)) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/mbytor.F src/packlib/kernlib/kerngen/tcgens/mbytor.F --- src.orig/packlib/kernlib/kerngen/tcgens/mbytor.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/mbytor.F 2005-11-08 17:18:16.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MBYTOR = IOR (IZW, ISHFTR(ISHFTL(MZ,NBITPW-NZB), + NBITPW+1-IZP-NZB) ) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MBYTOR = IOR (IZW, ISHFT (ISHFT (MZ,NBITPW-NZB), + -NBITPW-1+IZP+NZB) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/mcbyt.F src/packlib/kernlib/kerngen/tcgens/mcbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/mcbyt.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/mcbyt.F 2005-11-08 17:01:05.000000000 +0900 @@ -19,18 +19,18 @@ C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MCBYT = IOR ( + IAND(IZW, NOT(ISHFTL(ISHFTR(IALL11, NBITPW-NZB), IZP-1))) +, ISHFTR(ISHFTL(ISHFTR(MZ, IZQ-1),NBITPW-NZB), NBITPW+1-IZP-NZB)) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MCBYT = IOR ( + IAND(IZW, NOT(ISHFT (ISHFT (IALL11,-NBITPW+NZB), IZP-1))) +, ISHFT (ISHFT (ISHFT (MZ,-IZQ+1),NBITPW-NZB),-NBITPW-1+IZP+NZB)) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/msbit.F src/packlib/kernlib/kerngen/tcgens/msbit.F --- src.orig/packlib/kernlib/kerngen/tcgens/msbit.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/msbit.F 2005-11-08 17:19:01.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSBIT = IOR (IAND (IZW, NOT(ISHFTL(1,IZP-1)) ) +, ISHFTL(IAND(MZ,1),IZP-1) ) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSBIT = IOR (IAND (IZW, NOT(ISHFT (1,IZP-1)) ) +, ISHFT (IAND(MZ,1),IZP-1) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/msbit0.F src/packlib/kernlib/kerngen/tcgens/msbit0.F --- src.orig/packlib/kernlib/kerngen/tcgens/msbit0.F 1996-02-16 02:50:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/msbit0.F 2005-11-08 16:53:12.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSBIT0 = IAND (IZW, NOT(ISHFTL(1,IZP-1))) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSBIT0 = IAND (IZW, NOT(ISHFT (1,IZP-1))) #endif RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/msbit1.F src/packlib/kernlib/kerngen/tcgens/msbit1.F --- src.orig/packlib/kernlib/kerngen/tcgens/msbit1.F 1996-02-16 02:50:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/msbit1.F 2005-11-08 16:53:55.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSBIT1 = IOR (IZW, ISHFTL(1,IZP-1)) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSBIT1 = IOR (IZW, ISHFT (1,IZP-1)) #endif RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/msbyt.F src/packlib/kernlib/kerngen/tcgens/msbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/msbyt.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/msbyt.F 2005-11-08 17:11:41.000000000 +0900 @@ -19,18 +19,18 @@ C it should be replaced by a machine-specific fast routine #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSBYT = IOR ( + IAND(IZW, NOT(ISHFTL(ISHFTR(IALL11, NBITPW-NZB),IZP-1))) +, ISHFTR(ISHFTL(MZ,NBITPW-NZB), NBITPW+1-IZP-NZB) ) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSBYT = IOR ( + IAND(IZW, NOT(ISHFT (ISHFT (IALL11,-NBITPW+NZB),IZP-1))) +, ISHFT (ISHFT (MZ,NBITPW-NZB),-NBITPW-1+IZP+NZB) ) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/pkbyt.F src/packlib/kernlib/kerngen/tcgens/pkbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/pkbyt.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/pkbyt.F 2005-11-08 16:59:00.000000000 +0900 @@ -22,7 +22,7 @@ #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass @@ -40,10 +40,10 @@ GO TO 12 11 NPWD = NBITS(2) -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSKA = ISHFTR (IALL11, NBITPW-NZB) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSKA = ISHFT (IALL11,-NBITPW+NZB) #endif @@ -54,10 +54,10 @@ JPOS = JTH - (JBV-1)*NPWD - 1 IF (JPOS.EQ.0) GO TO 21 NL = JPOS*NZB -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSKU = ISHFTL (MSKA,NL) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSKU = ISHFT (MSKA,NL) #endif JIVE = NPWD - JPOS @@ -73,18 +73,18 @@ 24 JIV = JIV + 1 IZW = IOR (IAND(NOT(MSKU),IZW), -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) + IAND(MSKU,ISHFTL(MIV(JIV),NL))) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) + IAND(MSKU,ISHFT (MIV(JIV),NL))) #endif IF (JIV.EQ.JIVE) GO TO 27 NL = NL + NZB -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSKU = ISHFTL (MSKU,NZB) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSKU = ISHFT (MSKU,NZB) #endif GO TO 24 diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/rndm.F src/packlib/kernlib/kerngen/tcgens/rndm.F --- src.orig/packlib/kernlib/kerngen/tcgens/rndm.F 1997-10-24 01:37:04.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/rndm.F 2005-11-08 17:23:13.000000000 +0900 @@ -52,17 +52,17 @@ SAVE MCGN DATA MCGN /12345/ -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif MCGN = MCGN * 69069 -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MANT = ISHFT (MCGN,-8) #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MANT = ISHFTR(MCGN, 8) #endif IF (MANT.EQ.0) GO TO 14 @@ -81,10 +81,10 @@ C-- Integer random number ENTRY IRNDM (ISEED) MCGN = MCGN * 69069 -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) IRNDM = ISHFT (MCGN,-1) #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IRNDM = ISHFTR(MCGN, 1) #endif RETURN diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/sbit.F src/packlib/kernlib/kerngen/tcgens/sbit.F --- src.orig/packlib/kernlib/kerngen/tcgens/sbit.F 1996-02-16 02:50:13.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/sbit.F 2005-11-08 17:03:47.000000000 +0900 @@ -18,17 +18,17 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = IOR ( IAND (IZW, NOT(ISHFTL(1,IZP-1))) +, ISHFTL(IAND(IT,1), IZP-1) ) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) IZW = IOR ( IAND (IZW, NOT(ISHFT (1,IZP-1))) +, ISHFT (IAND(IT,1), IZP-1) ) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/sbit0.F src/packlib/kernlib/kerngen/tcgens/sbit0.F --- src.orig/packlib/kernlib/kerngen/tcgens/sbit0.F 1996-02-16 02:50:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/sbit0.F 2005-11-08 16:49:44.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = IAND (IZW, NOT(ISHFTL(1,IZP-1)) ) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) IZW = IAND (IZW, NOT(ISHFT (1,IZP-1)) ) #endif #if defined(CERNLIB_QMILSTD) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/sbit1.F src/packlib/kernlib/kerngen/tcgens/sbit1.F --- src.orig/packlib/kernlib/kerngen/tcgens/sbit1.F 1996-02-16 02:50:19.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/sbit1.F 2005-11-08 16:49:44.000000000 +0900 @@ -18,16 +18,16 @@ C This non-ANSI code is a default which may be slow, if so C it should be replaced by a machine-specific fast routine -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = IOR (IZW, ISHFTL(1,IZP-1)) #endif -#if (defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD)) +#if ((defined(CERNLIB_QISASTD))&&(!defined(CERNLIB_QMILSTD))) || defined(CERNLIB_GFORTRAN) IZW = IOR (IZW, ISHFT (1,IZP-1)) #endif #if defined(CERNLIB_QMILSTD) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/sbyt.F src/packlib/kernlib/kerngen/tcgens/sbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/sbyt.F 1996-02-16 02:50:14.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/sbyt.F 2005-11-08 16:49:44.000000000 +0900 @@ -20,18 +20,18 @@ C #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if (!defined(CERNLIB_QISASTD)) && (!defined(CERNLIB_GFORTRAN)) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if (!defined(CERNLIB_QISASTD)) && (!defined(CERNLIB_GFORTRAN)) MSK = ISHFTR (IALL11, NBITPW-NZB) IZW = IOR ( IAND (IZW, NOT(ISHFTL(MSK,IZP-1))) +, ISHFTL(IAND(IT,MSK),IZP-1)) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSK = ISHFT (IALL11,-NBITPW+NZB) IZW = IOR ( IAND (IZW, NOT(ISHFT (MSK,IZP-1))) +, ISHFT (IAND(IT,MSK),IZP-1)) diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/sbytor.F src/packlib/kernlib/kerngen/tcgens/sbytor.F --- src.orig/packlib/kernlib/kerngen/tcgens/sbytor.F 1996-02-16 02:50:14.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/sbytor.F 2005-11-08 17:29:40.000000000 +0900 @@ -20,17 +20,17 @@ C #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" * Ignoring t=pass #endif -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = IOR (IZW, + ISHFTL (IAND(IT,ISHFTR(IALL11, NBITPW-NZB)), IZP-1)) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) IZW = IOR (IZW, + ISHFT (IAND(IT,ISHFT (IALL11,-NBITPW+NZB)), IZP-1)) #endif diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/upkbyt.F src/packlib/kernlib/kerngen/tcgens/upkbyt.F --- src.orig/packlib/kernlib/kerngen/tcgens/upkbyt.F 1996-02-16 02:50:15.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/upkbyt.F 2005-11-08 16:49:44.000000000 +0900 @@ -22,7 +22,7 @@ #include "kerngen/wordsize.inc" #include "kerngen/iall1s.inc" -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) #include "kerngen/q_andor.inc" #include "kerngen/q_shift.inc" #endif @@ -39,10 +39,10 @@ GO TO 12 11 NPWD = NBITS(2) -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) MSKA = ISHFTR (IALL11, NBITPW-NZB) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) MSKA = ISHFT (IALL11,-NBITPW+NZB) #endif @@ -54,10 +54,10 @@ IF (JPOS.EQ.0) GO TO 21 NR = JPOS*NZB JIVE = NPWD - JPOS -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = ISHFTR (MBV(JBV), NR) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) IZW = ISHFT (MBV(JBV),-NR) #endif GO TO 22 @@ -71,10 +71,10 @@ 24 JIV = JIV + 1 MIV(JIV) = IAND (MSKA,IZW) IF (JIV.EQ.JIVE) GO TO 27 -#if !defined(CERNLIB_QISASTD) +#if !defined(CERNLIB_QISASTD) && !defined(CERNLIB_GFORTRAN) IZW = ISHFTR (IZW, NZB) #endif -#if defined(CERNLIB_QISASTD) +#if defined(CERNLIB_QISASTD) || defined(CERNLIB_GFORTRAN) IZW = ISHFT (IZW,-NZB) #endif GO TO 24 diff -uNr src.orig/packlib/kernlib/kerngen/tcgens/vblank.F src/packlib/kernlib/kerngen/tcgens/vblank.F --- src.orig/packlib/kernlib/kerngen/tcgens/vblank.F 1996-02-16 02:50:16.000000000 +0900 +++ src/packlib/kernlib/kerngen/tcgens/vblank.F 2005-11-07 21:28:40.000000000 +0900 @@ -14,6 +14,9 @@ C INTEGER A(*), BLANK DATA BLANK / 4H / +#if defined(CERNLIB_GFORTRAN) + save +#endif C IF (N.LE.0) RETURN DO 9 I= 1,N diff -uNr src.orig/packlib/kernlib/kerngen/unix/Imakefile src/packlib/kernlib/kerngen/unix/Imakefile --- src.orig/packlib/kernlib/kerngen/unix/Imakefile 1996-02-16 02:50:06.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -7,12 +7,15 @@ #if defined(CERNLIB_SUN) || defined(CERNLIB_SOLARIS) LIBDIRS=sungs #else -#if defined(CERNLIB_LNX) +#if defined(CERNLIB_LNX) && !defined(CERNLIB_GFORTRAN) LIBDIRS=lnxgs #else #if defined(CERNLIB_IRTD) LIBDIRS=irtdgs #else +#if defined(CERNLIB_GFORTRAN) +LIBDIRS=gfortgs +#else #undef IHaveSubdirs all:: @@ -22,6 +25,7 @@ #endif #endif #endif +#endif #ifdef IHaveSubdirs diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/Imakefile src/packlib/kernlib/kerngen/unix/gfortgs/Imakefile --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/Imakefile 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,6 @@ + +SRCS_F= irndm.F qnext.F rdmin.F + +SRCS_C= lshift.c ishftr.c getarg.c + +SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/getarg.c src/packlib/kernlib/kerngen/unix/gfortgs/getarg.c --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/getarg.c 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/getarg.c 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,4 @@ +void getarg_(int *pos, char *val, int len) +{ + _gfortran_getarg_i4(pos, val, len); +} diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/irndm.F src/packlib/kernlib/kerngen/unix/gfortgs/irndm.F --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/irndm.F 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/irndm.F 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,17 @@ +* +* $Id: irndm.F,v 1.1.1.1 1996/02/15 17:50:07 mclareni Exp $ +* +* $Log: irndm.F,v $ +* Revision 1.1.1.1 1996/02/15 17:50:07 mclareni +* Kernlib +* +* +#include "kerngen/pilot.h" + FUNCTION IRNDM(ISEEK) + COMMON /MCGN/ MCGN + +C-- Integer random number + MCGN = MCGN * 69069 + IRNDM = ISHFT (MCGN,-1) + RETURN + END diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/ishftr.c src/packlib/kernlib/kerngen/unix/gfortgs/ishftr.c --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/ishftr.c 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/ishftr.c 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,21 @@ +/* + * $Id: ishftr.c,v 1.1.1.1 1996/02/15 17:50:07 mclareni Exp $ + * + * $Log: ishftr.c,v $ + * Revision 1.1.1.1 1996/02/15 17:50:07 mclareni + * Kernlib + * + */ +#include "kerngen/pilot.h" +/*> ROUTINE ISHFT + CERN PROGLIB# ISHFTR .VERSION KERNLNX 1.02 940511 + + Logical right shift by *len (+ve) places +*/ +unsigned int ishftr_(arg,len) +unsigned int *arg; +int *len; +{ + return(*arg >> *len); +} +/*> END <----------------------------------------------------------*/ diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/lshift.c src/packlib/kernlib/kerngen/unix/gfortgs/lshift.c --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/lshift.c 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/lshift.c 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,23 @@ +/* + * $Id: lshift.c,v 1.1.1.1 1996/02/15 17:50:07 mclareni Exp $ + * + * $Log: lshift.c,v $ + * Revision 1.1.1.1 1996/02/15 17:50:07 mclareni + * Kernlib + * + */ +#include "kerngen/pilot.h" +/*> ROUTINE ISHFT + CERN PROGLIB# ISHFT .VERSION KERNLNX 1.00 930507 + + Provides the value of the argument ARG with the bits shifted. + Bits shifted out to the left or right are lost, and zeros are shifted + in from the opposite end. CNL 210 +*/ +unsigned int lshift_(arg,len) +unsigned int *arg; +int *len; +{ + return((*len > 0)? *arg << *len: *arg >> (-*len)); +} +/*> END <----------------------------------------------------------*/ diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/qnext.F src/packlib/kernlib/kerngen/unix/gfortgs/qnext.F --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/qnext.F 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/qnext.F 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,12 @@ +* +* $Id: qnext.F,v 1.1.1.1 1996/02/15 17:50:08 mclareni Exp $ +* +* $Log: qnext.F,v $ +* Revision 1.1.1.1 1996/02/15 17:50:08 mclareni +* Kernlib +* +* +#include "kerngen/pilot.h" + SUBROUTINE QNEXT + RETURN + END diff -uNr src.orig/packlib/kernlib/kerngen/unix/gfortgs/rdmin.F src/packlib/kernlib/kerngen/unix/gfortgs/rdmin.F --- src.orig/packlib/kernlib/kerngen/unix/gfortgs/rdmin.F 2005-11-07 21:28:40.000000000 +0900 +++ src/packlib/kernlib/kerngen/unix/gfortgs/rdmin.F 2005-11-07 21:28:40.000000000 +0900 @@ -0,0 +1,20 @@ +* +* $Id: rdmin.F,v 1.1.1.1 1996/02/15 17:50:07 mclareni Exp $ +* +* $Log: rdmin.F,v $ +* Revision 1.1.1.1 1996/02/15 17:50:07 mclareni +* Kernlib +* +* +#include "kerngen/pilot.h" + SUBROUTINE RDMIN(ISEED) + COMMON /MCGN/ MCGN + +C-- Set the seed + MCGN = ISEED + RETURN + +C-- Get the seed + ENTRY RDMOUT (ISEED) + ISEED = MCGN + END diff -uNr src.orig/packlib/kernlib/kernnum/d704fort/Imakefile src/packlib/kernlib/kernnum/d704fort/Imakefile --- src.orig/packlib/kernlib/kernnum/d704fort/Imakefile 1996-06-12 19:03:53.000000000 +0900 +++ src/packlib/kernlib/kernnum/d704fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -4,6 +4,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kernlib/kernnum/f002fort/Imakefile src/packlib/kernlib/kernnum/f002fort/Imakefile --- src.orig/packlib/kernlib/kernnum/f002fort/Imakefile 1996-06-12 19:04:09.000000000 +0900 +++ src/packlib/kernlib/kernnum/f002fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -10,6 +10,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kernlib/kernnum/f003fort/Imakefile src/packlib/kernlib/kernnum/f003fort/Imakefile --- src.orig/packlib/kernlib/kernnum/f003fort/Imakefile 1996-06-12 19:04:12.000000000 +0900 +++ src/packlib/kernlib/kernnum/f003fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -11,6 +11,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kernlib/kernnum/f004fort/Imakefile src/packlib/kernlib/kernnum/f004fort/Imakefile --- src.orig/packlib/kernlib/kernnum/f004fort/Imakefile 1996-06-12 19:04:16.000000000 +0900 +++ src/packlib/kernlib/kernnum/f004fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -6,6 +6,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kernlib/kernnum/f010fort/Imakefile src/packlib/kernlib/kernnum/f010fort/Imakefile --- src.orig/packlib/kernlib/kernnum/f010fort/Imakefile 1996-06-12 19:04:19.000000000 +0900 +++ src/packlib/kernlib/kernnum/f010fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -7,6 +7,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags diff -uNr src.orig/packlib/kernlib/kernnum/f011fort/Imakefile src/packlib/kernlib/kernnum/f011fort/Imakefile --- src.orig/packlib/kernlib/kernnum/f011fort/Imakefile 1996-06-12 19:04:24.000000000 +0900 +++ src/packlib/kernlib/kernnum/f011fort/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -7,6 +7,10 @@ FDEBUGFLAGS=NoOpFortranDebugFlags #endif +#if defined(CERNLIB_MACOSX) +FDEBUGFLAGS := -O0 $(FDEBUGFLAGS) -O0 +#endif + FORTRANSAVEOPTION=FortranSaveFlags SubdirLibraryTarget(NullParameter,NullParameter) diff -uNr src.orig/packlib/kuip/kuip/kfor.h src/packlib/kuip/kuip/kfor.h --- src.orig/packlib/kuip/kuip/kfor.h 1998-12-17 23:20:22.000000000 +0900 +++ src/packlib/kuip/kuip/kfor.h 2005-11-07 21:28:40.000000000 +0900 @@ -1025,7 +1025,11 @@ #define Errrun F77_NAME(errrun,ERRRUN) #define Fmemcpy F77_NAME(fmemcpy,FMEMCPY) +#if !defined(CERNLIB_GFORTRAN) #define Getarg F77_NAME(getarg,GETARG) +#else +#define Getarg _gfortran_getarg_i4 +#endif extern SUBROUTINE Getarg; #define Goparm F77_NAME(goparm,GOPARM) extern SUBROUTINE Goparm; diff -uNr src.orig/packlib/kuip/kuip/ksys.h src/packlib/kuip/kuip/ksys.h --- src.orig/packlib/kuip/kuip/ksys.h 1997-09-02 23:50:01.000000000 +0900 +++ src/packlib/kuip/kuip/ksys.h 2005-11-07 21:28:40.000000000 +0900 @@ -188,6 +188,17 @@ #endif +#ifdef CERNLIB_MACOSX +# define MACOSX +# define MACHINE_NAME "MACOSX" +# define UNIX +# define HAVE_MEMMOVE +# define HAVE_STRCASECMP +# define HAVE_SELECT +# define MATCH_RE_COMP /* use re_comp/re_exec */ +#endif + + #ifdef MSDOS # define MACHINE_NAME "IBMPC" # define OS_NAME "MSDOS" diff -uNr src.orig/packlib/minuit/examples/fcnk0.F src/packlib/minuit/examples/fcnk0.F --- src.orig/packlib/minuit/examples/fcnk0.F 1996-03-07 23:31:32.000000000 +0900 +++ src/packlib/minuit/examples/fcnk0.F 2005-11-07 21:28:40.000000000 +0900 @@ -23,6 +23,9 @@ + / 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., + 0., 2., 1., 4., 4., 2., 4., 2., 2., 0., + 2., 3., 7., 2., 3., 6., 2., 4., 1., 5./ +#if defined(CERNLIB_GFORTRAN) + save +#endif C XRE = X(1) XIM = X(2) diff -uNr src.orig/packlib/zbook/test/zexam5.F src/packlib/zbook/test/zexam5.F --- src.orig/packlib/zbook/test/zexam5.F 1996-03-08 21:01:14.000000000 +0900 +++ src/packlib/zbook/test/zexam5.F 2005-11-07 21:28:40.000000000 +0900 @@ -54,7 +54,11 @@ C C NEW BRANCH C +#if !defined(CERNLIB_GFORTRAN) CALL ZBOOKN (Z,IZ(ID2-NLINKS-1),NDATA+MDATA,0,3HNEW,1) +#else + CALL ZBOOKN (Z,IZ(ID2-NLINKS-1),NDATA+MDATA,0,4HNEW ,1) +#endif IF (ZBUG (Z,100)) GO TO 999 C CALL ZPTREE (Z,ID2,5HTREE$,1HF) diff -uNr src.orig/packlib/zebra/fq/fzdaeof.inc src/packlib/zebra/fq/fzdaeof.inc --- src.orig/packlib/zebra/fq/fzdaeof.inc 1996-03-06 19:47:08.000000000 +0900 +++ src/packlib/zebra/fq/fzdaeof.inc 2005-11-07 21:28:40.000000000 +0900 @@ -30,7 +30,7 @@ *** PARAMETER (IOSEOF = 10) !* for xlf 2.2 *** PARAMETER (IOSEOF = 122) !* for xlf 2.3 PARAMETER (IOSEOF = 1) !* for xlf 3.2 -#elif defined(CERNLIB_QMLNX) +#elif defined(CERNLIB_QMLNX) && !defined(CERNLIB_GFORTRAN) PARAMETER (IOSEOF = 36) #elif defined(CERNLIB_QMOS9) PARAMETER (IOSEOF = 326) @@ -43,6 +43,8 @@ #elif defined(CERNLIB_WINDOWS) * only valid for dec fortran (e.g. not f2c + microsoft c) PARAMETER (IOSEOF = 36) +#elif defined(CERNLIB_GFORTRAN) + PARAMETER (IOSEOF = 3) #elif 1 PARAMETER (IOSEOF = -1) #endif diff -uNr src.orig/packlib/zebra/zebra/q_and.inc src/packlib/zebra/zebra/q_and.inc --- src.orig/packlib/zebra/zebra/q_and.inc 1996-04-19 01:15:05.000000000 +0900 +++ src/packlib/zebra/zebra/q_and.inc 2005-11-07 21:28:40.000000000 +0900 @@ -24,7 +24,7 @@ #elif defined(CERNLIB_QMIBMSI) IAND (IZV,IZW) = LAND (IZV, IZW) -#elif defined(CERNLIB_LNX) +#elif defined(CERNLIB_LNX) && !defined(CERNLIB_GFORTRAN) IAND(IZV,IZW) = AND(IZV,IZW) #elif defined(CERNLIB_SUN) diff -uNr src.orig/packlib/zebra/zebra/q_andor.inc src/packlib/zebra/zebra/q_andor.inc --- src.orig/packlib/zebra/zebra/q_andor.inc 1996-03-06 19:46:52.000000000 +0900 +++ src/packlib/zebra/zebra/q_andor.inc 2005-11-07 21:28:40.000000000 +0900 @@ -36,7 +36,7 @@ IEOR (IZV,IZW) = LXOR (IZV, IZW) NOT (IZW) = LCOMPL (IZW) -#elif defined(CERNLIB_LNX) +#elif defined(CERNLIB_LNX) && !defined(CERNLIB_GFORTRAN) IAND(IZV,IZW) = AND(IZV,IZW) IOR(IZV,IZW) = OR(IZV,IZW) IEOR(IZV,IZW) = XOR(IZV,IZW) diff -uNr src.orig/packlib/zebra/zebra/q_jbit.inc src/packlib/zebra/zebra/q_jbit.inc --- src.orig/packlib/zebra/zebra/q_jbit.inc 1996-04-19 01:15:06.000000000 +0900 +++ src/packlib/zebra/zebra/q_jbit.inc 2005-11-07 21:28:40.000000000 +0900 @@ -47,7 +47,7 @@ #elif defined(CERNLIB_QF_SIEM) JBIT (IZW,IZP) = SHFTR (SHFTL(IZW,32-IZP), 31) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) JBIT(IZW,IZP) = AND(ISHFTR(IZW,IZP-1),1) #elif defined(CERNLIB_OS9) diff -uNr src.orig/packlib/zebra/zebra/q_jbyt.inc src/packlib/zebra/zebra/q_jbyt.inc --- src.orig/packlib/zebra/zebra/q_jbyt.inc 1996-04-19 01:15:07.000000000 +0900 +++ src/packlib/zebra/zebra/q_jbyt.inc 2005-11-07 21:28:40.000000000 +0900 @@ -35,7 +35,7 @@ #if defined(CERNLIB_QF_NDP) JBYT (IZZW,IZZP,NZZB) = IBITS (IZZW,IZZP-1,NZZB) -#elif defined(CERNLIB_QF_F2C) +#elif defined(CERNLIB_QF_F2C) && !defined(CERNLIB_GFORTRAN) JBYT (IZW,IZP,NZB) = ISHFTR(LSHIFT(IZW,33-IZP-NZB),32-NZB) #endif diff -uNr src.orig/packlib/zebra/zebra/q_jbytet.inc src/packlib/zebra/zebra/q_jbytet.inc --- src.orig/packlib/zebra/zebra/q_jbytet.inc 1996-04-19 01:15:07.000000000 +0900 +++ src/packlib/zebra/zebra/q_jbytet.inc 2005-11-07 21:28:40.000000000 +0900 @@ -52,7 +52,7 @@ JBYTET (MZ,IZW,IZP,NZB) = LAND (MZ, + SHFTR (SHFTL(IZW,33-IZP-NZB), 32-NZB) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) JBYTET (MZ,IZW,IZP,NZB) = AND (MZ, + ISHFTR (LSHIFT(IZW,33-IZP-NZB),32-NZB) ) diff -uNr src.orig/packlib/zebra/zebra/q_jbytor.inc src/packlib/zebra/zebra/q_jbytor.inc --- src.orig/packlib/zebra/zebra/q_jbytor.inc 1996-04-19 01:15:10.000000000 +0900 +++ src/packlib/zebra/zebra/q_jbytor.inc 2005-11-07 21:28:40.000000000 +0900 @@ -50,7 +50,7 @@ JBYTOR (MZ,IZW,IZP,NZB) = LOR (MZ, + SHFTR (SHFTL(IZW,33-IZP-NZB), 32-NZB) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) JBYTOR (MZ,IZW,IZP,NZB) = OR (MZ, + ISHFTR (LSHIFT(IZW,33-IZP-NZB),32-NZB) ) diff -uNr src.orig/packlib/zebra/zebra/q_mbytet.inc src/packlib/zebra/zebra/q_mbytet.inc --- src.orig/packlib/zebra/zebra/q_mbytet.inc 1996-04-19 01:15:11.000000000 +0900 +++ src/packlib/zebra/zebra/q_mbytet.inc 2005-11-07 21:28:40.000000000 +0900 @@ -51,7 +51,7 @@ MBYTET (MZ,IZW,IZP,NZB) = LAND (IZW, LCOMPL(SHFTR ( + SHFTL(LCOMPL(MZ),32-NZB), 33-IZP-NZB)) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MBYTET (MZ,IZW,IZP,NZB) = AND (IZW, + NOT(ISHFTR (LSHIFT(NOT(MZ),32-NZB),33-IZP-NZB)) ) diff -uNr src.orig/packlib/zebra/zebra/q_mbytor.inc src/packlib/zebra/zebra/q_mbytor.inc --- src.orig/packlib/zebra/zebra/q_mbytor.inc 1996-04-19 01:15:12.000000000 +0900 +++ src/packlib/zebra/zebra/q_mbytor.inc 2005-11-07 21:28:40.000000000 +0900 @@ -51,7 +51,7 @@ MBYTOR (MZ,IZW,IZP,NZB) = LOR (IZW, SHFTR ( + SHFTL(MZ,32-NZB), 33-IZP-NZB) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MBYTOR (MZ,IZW,IZP,NZB) = OR (IZW, + ISHFTR (LSHIFT(MZ,32-NZB),33-IZP-NZB)) diff -uNr src.orig/packlib/zebra/zebra/q_or.inc src/packlib/zebra/zebra/q_or.inc --- src.orig/packlib/zebra/zebra/q_or.inc 1996-04-19 01:15:13.000000000 +0900 +++ src/packlib/zebra/zebra/q_or.inc 2005-11-07 21:28:40.000000000 +0900 @@ -24,7 +24,7 @@ #elif defined(CERNLIB_QMIBMSI) IOR (IZV,IZW) = LOR (IZV, IZW) -#elif defined(CERNLIB_LNX) +#elif defined(CERNLIB_LNX) && !defined(CERNLIB_GFORTRAN) IOR(IZV,IZW) = OR(IZV,IZW) #elif defined(CERNLIB_SUN) diff -uNr src.orig/packlib/zebra/zebra/q_sbit.inc src/packlib/zebra/zebra/q_sbit.inc --- src.orig/packlib/zebra/zebra/q_sbit.inc 1996-04-19 01:15:23.000000000 +0900 +++ src/packlib/zebra/zebra/q_sbit.inc 2005-11-07 21:28:40.000000000 +0900 @@ -46,7 +46,7 @@ MSBIT (MZ,IZW,IZP) = LOR (LAND (IZW, LCOMPL(SHFTL(1,IZP-1)) ) + , SHFTL(LAND(MZ,1),IZP-1) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MSBIT (MZ,IZW,IZP) = OR (AND (IZW, NOT(LSHIFT(1,IZP-1))) + ,LSHIFT(AND(MZ,1),IZP-1)) diff -uNr src.orig/packlib/zebra/zebra/q_sbit0.inc src/packlib/zebra/zebra/q_sbit0.inc --- src.orig/packlib/zebra/zebra/q_sbit0.inc 1996-04-19 01:15:24.000000000 +0900 +++ src/packlib/zebra/zebra/q_sbit0.inc 2005-11-07 21:28:40.000000000 +0900 @@ -41,7 +41,7 @@ #elif defined(CERNLIB_QF_SIEM) MSBIT0 (IZW,IZP) = LAND (IZW, LCOMPL(SHFTL(1,IZP-1)) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MSBIT0 (IZW,IZP) = AND (IZW, NOT(LSHIFT(1,IZP-1))) #elif defined(CERNLIB_PDP) diff -uNr src.orig/packlib/zebra/zebra/q_sbit1.inc src/packlib/zebra/zebra/q_sbit1.inc --- src.orig/packlib/zebra/zebra/q_sbit1.inc 1996-04-19 01:15:24.000000000 +0900 +++ src/packlib/zebra/zebra/q_sbit1.inc 2005-11-07 21:28:40.000000000 +0900 @@ -40,7 +40,7 @@ #elif defined(CERNLIB_QF_SIEM) MSBIT1 (IZW,IZP) = LOR (IZW, SHFTL(1,IZP-1) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MSBIT1 (IZW,IZP) = OR (IZW, LSHIFT(1,IZP-1)) #elif defined(CERNLIB_PDP) diff -uNr src.orig/packlib/zebra/zebra/q_sbyt.inc src/packlib/zebra/zebra/q_sbyt.inc --- src.orig/packlib/zebra/zebra/q_sbyt.inc 1996-03-06 19:46:52.000000000 +0900 +++ src/packlib/zebra/zebra/q_sbyt.inc 2005-11-07 21:28:40.000000000 +0900 @@ -43,7 +43,7 @@ + LAND (IZW, LCOMPL(SHFTL (SHFTR(-1,32-NZB), IZP-1))) + , SHFTR (SHFTL(MZ,32-NZB), 33-IZP-NZB) ) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) MSBYT (MZ,IZW,IZP,NZB) = OR ( + AND (IZW, NOT(LSHIFT (ISHFTR(NOT(0),32-NZB),IZP-1))) + ,ISHFTR (LSHIFT(MZ,32-NZB), 33-IZP-NZB) ) diff -uNr src.orig/packlib/zebra/zebra/q_shift.inc src/packlib/zebra/zebra/q_shift.inc --- src.orig/packlib/zebra/zebra/q_shift.inc 1996-03-06 19:46:52.000000000 +0900 +++ src/packlib/zebra/zebra/q_shift.inc 2005-11-07 21:28:40.000000000 +0900 @@ -36,7 +36,7 @@ ISHFTL (IZW,NZB) = SHFTL (IZW, NZB) ISHFTR (IZW,NZB) = SHFTR (IZW, NZB) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) ISHFTL (IZW,NZB) = LSHIFT (IZW,NZB) #elif (defined(CERNLIB_SUN))&&(!defined(CERNLIB_BUGLRSHFT)) diff -uNr src.orig/packlib/zebra/zebra/q_shiftl.inc src/packlib/zebra/zebra/q_shiftl.inc --- src.orig/packlib/zebra/zebra/q_shiftl.inc 1996-04-19 01:15:25.000000000 +0900 +++ src/packlib/zebra/zebra/q_shiftl.inc 2005-11-07 21:28:40.000000000 +0900 @@ -28,7 +28,7 @@ #elif defined(CERNLIB_QF_SIEM) ISHFTL (IZW,NZB) = SHFTL (IZW, NZB) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) ISHFTL (IZW,NZB) = LSHIFT (IZW,NZB) #elif (defined(CERNLIB_SUN))&&(!defined(CERNLIB_BUGLRSHFT)) diff -uNr src.orig/packlib/zebra/zebra/q_shiftr.inc src/packlib/zebra/zebra/q_shiftr.inc --- src.orig/packlib/zebra/zebra/q_shiftr.inc 1996-04-19 01:15:25.000000000 +0900 +++ src/packlib/zebra/zebra/q_shiftr.inc 2005-11-07 21:28:40.000000000 +0900 @@ -32,7 +32,7 @@ #elif defined(CERNLIB_QF_SIEM) ISHFTR (IZW,NZB) = SHFTR (IZW, NZB) -#elif defined(CERNLIB_LINUX) +#elif defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) #elif (defined(CERNLIB_SUN))&&(!defined(CERNLIB_BUGLRSHFT)) ISHFTR (IZW,NZB) = lrshft (IZW, NZB) diff -uNr src.orig/packlib/zebra/zebra/q_xor.inc src/packlib/zebra/zebra/q_xor.inc --- src.orig/packlib/zebra/zebra/q_xor.inc 1996-04-19 01:15:26.000000000 +0900 +++ src/packlib/zebra/zebra/q_xor.inc 2005-11-07 21:28:40.000000000 +0900 @@ -24,7 +24,7 @@ #elif defined(CERNLIB_QMIBMSI) IEOR (IZV,IZW) = LXOR (IZV, IZW) -#elif defined(CERNLIB_LNX) +#elif defined(CERNLIB_LNX) && !defined(CERNLIB_GFORTRAN) IEOR(IZV,IZW) = XOR(IZV,IZW) #elif defined(CERNLIB_SUN) diff -uNr src.orig/patchy/Imakefile src/patchy/Imakefile --- src.orig/patchy/Imakefile 1997-01-22 02:29:14.000000000 +0900 +++ src/patchy/Imakefile 2005-11-11 02:11:22.000000000 +0900 @@ -57,6 +57,12 @@ fcasplit p5lib.f RemoveFile(p5lib.f) cat p5lib.libmake >> p5lib.mkfca + sed -e 's;f77;gfortran;' -e 's;g77;gfortran;' -e 's;-Nx800;;' \ + -e 's;-Nc200;;' -e 's;+ppu;;' p5lib.mkfca > p5lib.mkfca.mod + sed -e 's;f77;gfortran;' -e 's;g77;gfortran;' -e 's;-Nx800;;' \ + -e 's;-Nc200;;' -e 's;+ppu;;' p5lib.shfca > p5lib.shfca.mod + mv p5lib.mkfca.mod p5lib.mkfca + mv p5lib.shfca.mod p5lib.shfca $(MAKE) -f p5lib.mkfca $@ RemoveFile(p5lib.mkfca) RemoveFile(p5lib.shfca) diff -uNr src.orig/patchy/fcasplit.F src/patchy/fcasplit.F --- src.orig/patchy/fcasplit.F 1999-12-01 02:37:25.000000000 +0900 +++ src/patchy/fcasplit.F 2005-11-16 02:00:55.000000000 +0900 @@ -344,7 +344,7 @@ PARAMETER (CHOVER= 'UNKNOWN') PARAMETER (CHPOF = '-c -O -fno-automatic') - PARAMETER (CHPOC = '-c -O2 -m486') + PARAMETER (CHPOC = '-c -O2') PARAMETER (CHPOA = ' ') PARAMETER (CHEXFOR = '.f') @@ -352,7 +352,7 @@ PARAMETER (CHEXAS = '.s') PARAMETER (CHEXOBJ = '.o') - PARAMETER (CHWHF = 'g77 ') + PARAMETER (CHWHF = 'gfortran ') PARAMETER (CHWHC = 'gcc ') PARAMETER (CHWHA = 'as ') #endif diff -uNr src.orig/patchy/patchy.car src/patchy/patchy.car --- src.orig/patchy/patchy.car 2005-11-11 00:21:15.000000000 +0900 +++ src/patchy/patchy.car 2005-11-11 01:08:31.000000000 +0900 @@ -754,18 +754,22 @@ +SELF. +USE, QFIO. !!! to try +USE, QNEWLINE. newlines are in memory +USE, INITRH. create routine header lines -+KEEP, Q_AND. - IAND (IZV,IZW) = AND (IZV, IZW) -+KEEP, Q_OR. - IOR (IZV,IZW) = OR (IZV, IZW) +c>>>>>> +C+KEEP, Q_AND. +C IAND (IZV,IZW) = AND (IZV, IZW) +C+KEEP, Q_OR. +C IOR (IZV,IZW) = OR (IZV, IZW) +c>>>>>> +KEEP, Q_XOR. IEOR (IZV,IZW) = XOR (IZV, IZW) +KEEP, Q_SHIFTL. ISHFTL (IZW,NZB) = LSHFT (IZW, NZB) +KEEP, Q_SHIFTR. ISHFTR (IZW,NZB) = RSHFT (IZW, NZB) -+KEEP, Q_JBIT. - JBIT (IZW,IZP) = AND (RSHFT(IZW,IZP-1), 1) +c>>>>>> +C+KEEP, Q_JBIT. +C JBIT (IZW,IZP) = AND (RSHFT(IZW,IZP-1), 1) +c>>>>>> +KEEP, Q_JBYT. JBYT (IZW,IZP,NZB)= RSHFT (LSHFT(IZW,33-IZP-NZB), 32-NZB) +KEEP, PGMSTOP. @@ -823,18 +827,22 @@ +DECK, SUN, T=JOIN, IF=QMSUN. version for SUN +USE, QNEWLINE. newlines are in memory +USE, INITRH. create routine header lines -+KEEP, Q_AND. - IAND (IZV,IZW) = AND (IZV, IZW) -+KEEP, Q_OR. - IOR (IZV,IZW) = OR (IZV, IZW) +c>>>>>> +C+KEEP, Q_AND. +C IAND (IZV,IZW) = AND (IZV, IZW) +C+KEEP, Q_OR. +C IOR (IZV,IZW) = OR (IZV, IZW) +c>>>>>> +KEEP, Q_XOR. IEOR (IZV,IZW) = XOR (IZV, IZW) +KEEP, Q_SHIFTL. ISHFTL (IZW,NZB) = LSHIFT (IZW, NZB) +KEEP, Q_SHIFTR, IF=-BUGLRSHFT. not usable with f77 3.0 ISHFTR (IZW,NZB) = lrshft (IZW, NZB) -+KEEP, Q_JBIT, IF=-BUGLRSHFT. - JBIT (IZW,IZP) = AND (lrshft(IZW,IZP-1), 1) +c>>>>> +C+KEEP, Q_JBIT, IF=-BUGLRSHFT. +C JBIT (IZW,IZP) = AND (lrshft(IZW,IZP-1), 1) +c>>>>> +KEEP, Q_JBYT, IF=-BUGLRSHFT. JBYT (IZW,IZP,NZB)= lrshft (LSHIFT(IZW,33-IZP-NZB),32-NZB) +DECK, VAX, T=JOIN, IF=QMVAX. version for VAX @@ -850,17 +858,21 @@ +USE, QNEWLINE. newlines are in memory +USE, INITRH. create routine header lines +DECK, F2C, T=JOIN, IF=QF_F2C. code for f2c -+KEEP, Q_AND. - IAND(IZV,IZW) = AND(IZV,IZW) -+KEEP, Q_OR. - IOR(IZV,IZW) = OR(IZV,IZW) +c>>>>>> +C+KEEP, Q_AND. +C IAND(IZV,IZW) = AND(IZV,IZW) +C+KEEP, Q_OR. +C IOR(IZV,IZW) = OR(IZV,IZW) +c>>>>>> +KEEP, Q_XOR. IEOR(IZV,IZW) = XOR(IZV,IZW) +KEEP, Q_SHIFTL. ISHFTL (IZW,NZB) = LSHIFT (IZW,NZB) +KEEP, Q_SHIFTR. -+KEEP, Q_JBIT. - JBIT(IZW,IZP) = AND(ISHFTR(IZW,IZP-1),1) +c>>>>>> +C+KEEP, Q_JBIT. +C JBIT(IZW,IZP) = AND(ISHFTR(IZW,IZP-1),1) +c>>>>>> +KEEP, Q_JBYT. JBYT(IZW,IZP,NZB) = ISHFTR(LSHIFT(IZW,33-IZP-NZB),32-NZB) +DECK, ALL, T=JOIN. diff -uNr src.orig/pawlib/comis/code/cscrexec.F src/pawlib/comis/code/cscrexec.F --- src.orig/pawlib/comis/code/cscrexec.F 2000-09-25 23:16:36.000000000 +0900 +++ src/pawlib/comis/code/cscrexec.F 2005-11-07 21:28:40.000000000 +0900 @@ -175,10 +175,15 @@ + // NAME(:LN) //'.sl '// NAME(:LN) //'.o' ENDIF #endif -#if defined(CERNLIB_LINUX) +#if defined(CERNLIB_LINUX) && !defined(CERNLIB_MACOSX) CHLINE= 'ld -shared -o ' + // NAME(:LN) //'.sl '// NAME(:LN) //'.o' #endif +#if defined(CERNLIB_MACOSX) + CHLINE= 'g77 -bundle -bundle_loader `/usr/bin/which pawX11` ' + + // ' -bind_at_load -o ' + + // NAME(:LN) //'.sl '// NAME(:LN) //'.o' +#endif #if defined(CERNLIB_ALPHA_OSF) CHLINE= 'ld -shared -o ' + // NAME(:LN) //'.sl '// NAME(:LN) //'.o \\' diff -uNr src.orig/pawlib/paw/fmotif/Imakefile src/pawlib/paw/fmotif/Imakefile --- src.orig/pawlib/paw/fmotif/Imakefile 1996-09-23 23:20:46.000000000 +0900 +++ src/pawlib/paw/fmotif/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -2,7 +2,7 @@ ntwini.F pamloc.F pbhist.F pbhlun.F pbpiaf.F pbplun.F \ @@\ plotisto.F pmhist.F pminit.F show_chain.F -#ifdef CERNLIB_LINUX +#if defined(CERNLIB_LINUX) && !defined(CERNLIB_GFORTRAN) FORTRANOPTIONS = -fno-backslash $(FORTRANSAVEOPTION) -fno-second-underscore #endif diff -uNr src.orig/pawlib/paw/programs/Imakefile src/pawlib/paw/programs/Imakefile --- src.orig/pawlib/paw/programs/Imakefile 2002-04-25 19:20:11.000000000 +0900 +++ src/pawlib/paw/programs/Imakefile 2005-11-07 21:28:40.000000000 +0900 @@ -9,7 +9,7 @@ EXTRA_LDOPTIONS=-Wl,-E #endif -#if defined(CERNLIB_LINUX) +#if defined(CERNLIB_LINUX) && !defined(CERNLIB_MACOSX) EXTRA_LDOPTIONS=-Wl,-E #endif diff -uNr src.orig/pawlib/sigma/src/siallm.F src/pawlib/sigma/src/siallm.F --- src.orig/pawlib/sigma/src/siallm.F 1995-12-12 23:36:15.000000000 +0900 +++ src/pawlib/sigma/src/siallm.F 2005-11-07 21:28:40.000000000 +0900 @@ -108,9 +108,20 @@ GO TO 37 21 IF(N.EQ.2)GO TO 2 22 MN1=M-N+1 +#if !defined(CERNLIB_GFORTRAN) IF(REAL(A(N,N)).NE.0..OR.AIMAG(A(N,N)).NE.0.) 1 IF(ABS(REAL(A(N,N-1)/A(N,N)))+ABS(AIMAG(A(N,N-1)/A(N,N)))-1.E-9) 2 24,24,23 +#else + IF (REAL(A(N,N)).NE.0..OR.AIMAG(A(N,N)).NE.0.) THEN + IF (ABS(REAL(A(N,N-1)/A(N,N)))+ABS(AIMAG(A(N,N-1)/A(N,N))) + + -1.E-9.LE.0.) THEN + GO TO 24 + ELSE + GO TO 23 + ENDIF + ENDIF +#endif 23 IF(ABS(REAL(A(N,N-1)))+ABS(AIMAG(A(N,N-1))).GE.EPS)GO TO 25 24 LAMBDA(MN1)=A(N,N)+SHIFT(1) ICOUNT=0 diff -uNr src.orig/scripts/cernlib src/scripts/cernlib --- src.orig/scripts/cernlib 2003-01-23 23:00:37.000000000 +0900 +++ src/scripts/cernlib 2005-11-07 21:28:40.000000000 +0900 @@ -116,6 +116,9 @@ [ -d /usr/X11R6/lib ] && SYSGMOTIF="-L/usr/X11R6/lib -lXm -lXt -lXp -lXext -lX11" [ `uname -m` = ppc ] && SYSGMOTIF="$SYSGMOTIF -lSM -lICE -lXpm" ;; + Darwin) [ -d /usr/X11R6/lib ] && SYSGX11="-L/usr/X11R6/lib -lX11" + [ -d /usr/X11R6/lib ] && SYSGMOTIF="-L/usr/X11R6/lib -lXm -lXt -lXp -lXext -lX11 -lSM -lICE -lXpm" + ;; NeXT) SYSGX11="/usr/lib/X11/libX11.r" ; SYSGMOTIF="-lXm -lXt /usr/lib/X11/libX11.r" ;; OSF1) SYSGX11="-lX11 -ldnet_stub" ; @@ -209,6 +212,9 @@ if [ "$Msys" = "Linux" ] ; then CERNLIB="$CERNLIB -lnsl -lcrypt -ldl" fi + if [ "$Msys" = "Darwin" ] ; then + CERNLIB="$CERNLIB -L/usr/local/lib/system -lcompat -ldl" + fi fi