|
|
24be4e6 |
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
|
24be4e6 |
## 211-support-amd64-and-itanium.dpatch by <kmccarty@debian.org>
|
|
|
24be4e6 |
##
|
|
|
24be4e6 |
## All lines beginning with `## DP:' are a description of the patch.
|
|
|
b7adf43 |
## DP: Large patch from Harald Vogt <hvogt@ifh.de> to make CERNLIB work better
|
|
|
24be4e6 |
## DP: (at least when statically linked) on 64-bit architectures.
|
|
|
24be4e6 |
## DP: Slightly modified in an attempt to keep ABI compatibility of the
|
|
|
24be4e6 |
## DP: dynamic libraries; not that it matters much as they don't work well
|
|
|
24be4e6 |
## DP: when dynamically linked on 64-bit anyway.
|
|
|
24be4e6 |
|
|
|
24be4e6 |
@DPATCH@
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/cfortran/hbook.h cernlib-2006.dfsg.2/src/cfortran/hbook.h
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/cfortran/hbook.h 1999-11-15 17:01:12.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/cfortran/hbook.h 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -489,6 +489,10 @@
|
|
|
24be4e6 |
#define HBALLOC(IDN,CHDIR,VAR,BLOCK,ITYPE,ISIZE,IFIRST,NELEM,IBASE,IOFF,NUSE)\
|
|
|
24be4e6 |
CCALLSFSUB11(HBALLOC,hballoc,INT,STRING,STRING,STRING,INT,INT,INT,INT,INTV,PINT,PINT,IDN,CHDIR,VAR,BLOCK,ITYPE,ISIZE,IFIRST,NELEM,IBASE,IOFF,NUSE)
|
|
|
24be4e6 |
|
|
|
24be4e6 |
+PROTOCCALLSFSUB11(HBALLOC64,hballoc64,INT,STRING,STRING,STRING,INT,INT,INT,INT,INTV,PLONG,PINT)
|
|
|
24be4e6 |
+#define HBALLOC64(IDN,CHDIR,VAR,BLOCK,ITYPE,ISIZE,IFIRST,NELEM,IBASE,IOFF,NUSE)\
|
|
|
24be4e6 |
+ CCALLSFSUB11(HBALLOC64,hballoc64,INT,STRING,STRING,STRING,INT,INT,INT,INT,INTV,PLONG,PINT,IDN,CHDIR,VAR,BLOCK,ITYPE,ISIZE,IFIRST,NELEM,IBASE,IOFF,NUSE)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
PROTOCCALLSFSUB1(HBFREE,hbfree,INT)
|
|
|
24be4e6 |
#define HBFREE(LUN) CCALLSFSUB1(HBFREE,hbfree,INT,LUN)
|
|
|
24be4e6 |
|
|
|
24be4e6 |
@@ -508,6 +512,13 @@
|
|
|
24be4e6 |
#define HGNTBF(IDN,VAR,IOFFST,NVAR,IDNEVT,IERROR)\
|
|
|
24be4e6 |
CCALLSFSUB6(HGNTBF,hgntbf,INT,ZTRINGV,INTV,INT,INT,PINT,IDN,VAR,IOFFST,NVAR,IDNEVT,IERROR)
|
|
|
24be4e6 |
|
|
|
24be4e6 |
+PROTOCCALLSFSUB6(HGNTBF64,hgntbf64,INT,ZTRINGV,LONGV,INT,INT,PINT)
|
|
|
24be4e6 |
+/* fix the element length of VAR to 32 */
|
|
|
24be4e6 |
+#define hgntbf64_ELEMS_2 ZTRINGV_ARGS(4)
|
|
|
24be4e6 |
+#define hgntbf64_ELEMLEN_2 ZTRINGV_NUM(32)
|
|
|
24be4e6 |
+#define HGNTBF64(IDN,VAR,IOFFST,NVAR,IDNEVT,IERROR)\
|
|
|
24be4e6 |
+ CCALLSFSUB6(HGNTBF64,hgntbf64,INT,ZTRINGV,LONGV,INT,INT,PINT,IDN,VAR,IOFFST,NVAR,IDNEVT,IERROR)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
PROTOCCALLSFSUB1(HGTDIR,hgtdir,PSTRING)
|
|
|
24be4e6 |
#define HGTDIR(CHDIR) CCALLSFSUB1(HGTDIR,hgtdir,PSTRING,CHDIR)
|
|
|
24be4e6 |
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/cspack/cspack/hcntpar.inc cernlib-2006.dfsg.2/src/packlib/cspack/cspack/hcntpar.inc
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/cspack/cspack/hcntpar.inc 1996-03-08 15:44:16.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/cspack/cspack/hcntpar.inc 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -22,7 +22,7 @@
|
|
|
24be4e6 |
+ ZIFREA=7, ZNWTIT=8, ZITIT1=9, ZNCHRZ=13, ZIFBIT=8,
|
|
|
24be4e6 |
+ ZDESC=1, ZLNAME=2, ZNAME=3, ZRANGE=4, ZNADDR=12,
|
|
|
24be4e6 |
+ ZARIND=11, ZIBLOK=8, ZNBLOK=10, ZIBANK=9, ZIFTMP=11,
|
|
|
24be4e6 |
- + ZITMP=10, ZNTMP=5, ZNTMP1=3, ZLINK=6)
|
|
|
24be4e6 |
+ + ZITMP=10, ZNTMP=5, ZNTMP1=4, ZLINK=6)
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/cspack/sysreq/netreq.c cernlib-2006.dfsg.2/src/packlib/cspack/sysreq/netreq.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/cspack/sysreq/netreq.c 2007-12-14 21:41:17.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/cspack/sysreq/netreq.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -341,7 +341,7 @@
|
|
|
24be4e6 |
return(-errno);
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
TRACE(2, "sysreq", "recv reply length");
|
|
|
24be4e6 |
- if ((int)(p = RecvStr(s, &replylen)) <0) {
|
|
|
24be4e6 |
+ if ((long)(p = RecvStr(s, &replylen)) <0) {
|
|
|
24be4e6 |
TRACE(2, "sysreq", "RecvStr(RepLen): (errno=%d)", errno);
|
|
|
24be4e6 |
(void) close(s);
|
|
|
24be4e6 |
END_TRACE();
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hbook/hcntpar.inc cernlib-2006.dfsg.2/src/packlib/hbook/hbook/hcntpar.inc
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hbook/hcntpar.inc 1996-01-16 17:07:52.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hbook/hcntpar.inc 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -24,7 +24,7 @@
|
|
|
24be4e6 |
+ ZIFREA=7, ZNWTIT=8, ZITIT1=9, ZNCHRZ=13, ZIFBIT=8,
|
|
|
24be4e6 |
+ ZDESC=1, ZLNAME=2, ZNAME=3, ZRANGE=4, ZNADDR=12,
|
|
|
24be4e6 |
+ ZARIND=11, ZIBLOK=8, ZNBLOK=10, ZIBANK=9, ZIFTMP=11,
|
|
|
24be4e6 |
- + ZID=12, ZITMP=10, ZNTMP=6, ZNTMP1=3, ZLINK=6)
|
|
|
24be4e6 |
+ + ZID=12, ZITMP=10, ZNTMP=6, ZNTMP1=4, ZLINK=6)
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hmmap/hcreatem.F cernlib-2006.dfsg.2/src/packlib/hbook/hmmap/hcreatem.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hmmap/hcreatem.F 1996-03-13 10:13:20.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hmmap/hcreatem.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -39,11 +39,11 @@
|
|
|
24be4e6 |
************************************************************************
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
CHARACTER*(*) MFILE
|
|
|
24be4e6 |
-#if !defined(CERNLIB_ALPHA_OSF)
|
|
|
24be4e6 |
+#if !defined(CERNLIB_ALPHA_OSF) && !defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
INTEGER ICOMAD(1), ISIZE, IBASE(1), HCREATEI
|
|
|
24be4e6 |
SAVE ICOMAD
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
-#if defined(CERNLIB_ALPHA_OSF)
|
|
|
24be4e6 |
+#if defined(CERNLIB_ALPHA_OSF) || defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
INTEGER ISIZE, IBASE(1), HCREATEI
|
|
|
24be4e6 |
INTEGER*8 ICOMAD(1)
|
|
|
24be4e6 |
SAVE ICOMAD
|
|
|
24be4e6 |
@@ -63,6 +63,10 @@
|
|
|
24be4e6 |
************************************************************************
|
|
|
24be4e6 |
ICOMAD(1) = 0
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+C this should be a reasonable range for IA64 architectures
|
|
|
24be4e6 |
+ ICOMAD(1) = 2**30
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
#if (defined(CERNLIB_DECS))&&(!defined(CERNLIB_ALPHA))
|
|
|
24be4e6 |
ICOMAD(1) = 4*LOCF(ICOMAD(1)) + MFEN
|
|
|
24be4e6 |
ICOMAD(1) = ((ICOMAD(1)+4095)/4096)*4096
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hmmap/hmapm.F cernlib-2006.dfsg.2/src/packlib/hbook/hmmap/hmapm.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hmmap/hmapm.F 2001-10-02 09:06:15.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hmmap/hmapm.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -54,11 +54,11 @@
|
|
|
24be4e6 |
************************************************************************
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
CHARACTER*(*) MFILE
|
|
|
24be4e6 |
-#if !defined(CERNLIB_ALPHA_OSF)
|
|
|
24be4e6 |
+#if !defined(CERNLIB_ALPHA_OSF) && !defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
INTEGER ICOMAD(1), IBASE(1), HMAPI
|
|
|
24be4e6 |
SAVE ICOMAD
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
-#if defined(CERNLIB_ALPHA_OSF)
|
|
|
24be4e6 |
+#if defined(CERNLIB_ALPHA_OSF) || defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
INTEGER IBASE(1), HMAPI
|
|
|
24be4e6 |
INTEGER*8 ICOMAD(1)
|
|
|
24be4e6 |
SAVE ICOMAD
|
|
|
24be4e6 |
@@ -81,6 +81,10 @@
|
|
|
24be4e6 |
CALL UCTOH(MFILE2,MKEY,4,4)
|
|
|
24be4e6 |
ICOMAD(1) = 0
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+C this should be a reasonable range for IA64 architectures
|
|
|
24be4e6 |
+ ICOMAD(1) = 2**30
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
#if defined(CERNLIB_DECS)
|
|
|
24be4e6 |
ICOMAD(1) = 4*LOCF(ICOMAD(1)) + MFEN
|
|
|
24be4e6 |
ICOMAD(1) = ((ICOMAD(1)+4095)/4096)*4096
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hballoc.F cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hballoc.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hballoc.F 1996-01-16 17:07:56.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hballoc.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -42,3 +42,26 @@
|
|
|
24be4e6 |
ENDIF
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
END
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+* 64-bit version (separate to preserve ABI compatibility)
|
|
|
24be4e6 |
+ SUBROUTINE HBALLOC64(IDN,CHDIR,VAR,BLOCK,ITYPE,ISIZE,IFIRST,NELEM,
|
|
|
24be4e6 |
+ + IBASE,IOFF,NUSE)
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ CHARACTER*(*) CHDIR, VAR, BLOCK
|
|
|
24be4e6 |
+ INTEGER IDN, ITYPE, ISIZE, NELEM, NUSE, IFIRST, IBASE(1)
|
|
|
24be4e6 |
+ INTEGER*8 IBUF(1), IOFF
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ LC = LENOCC(CHDIR)
|
|
|
24be4e6 |
+ LV = LENOCC(VAR)
|
|
|
24be4e6 |
+ LB = LENOCC(BLOCK)
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ CALL HBALLO1(IDN, CHDIR, LC, VAR, LV, BLOCK, LB, ITYPE, ISIZE,
|
|
|
24be4e6 |
+ + IFIRST, NELEM, IBUF, NUSE)
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ IF (NUSE .EQ. 0) THEN
|
|
|
24be4e6 |
+ IOFF = 0
|
|
|
24be4e6 |
+ ELSE
|
|
|
24be4e6 |
+ IOFF = IBUF(1) - LOC(IBASE(1))/4
|
|
|
24be4e6 |
+ ENDIF
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ END
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hbnt.F cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hbnt.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hbnt.F 1996-01-16 17:07:56.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hbnt.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -269,11 +269,13 @@
|
|
|
24be4e6 |
************************************************************************
|
|
|
24be4e6 |
* * * *
|
|
|
24be4e6 |
* 1 * * Number of variables to be read out *
|
|
|
24be4e6 |
- * * * *** For every variable 3 words (ZNTMP1) *** *
|
|
|
24be4e6 |
+ * * * *** For every variable 4 words (ZNTMP1) *** *
|
|
|
24be4e6 |
* 2 * * Index of variable in LNAME bank *
|
|
|
24be4e6 |
* 3 * * Offset of variable in LNAME bank (INDX-1)*ZNADDR*
|
|
|
24be4e6 |
* 4 * * Offset in dynamically allocated buffer (only *
|
|
|
24be4e6 |
* * * used via HGNTBF) otherwise 0 *
|
|
|
24be4e6 |
+ * 5 * * spare (used in 64 bit architectures for upper *
|
|
|
24be4e6 |
+ * * * address part) *
|
|
|
24be4e6 |
************************************************************************
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
*
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgnt2.F cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgnt2.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgnt2.F 1999-03-05 15:42:35.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgnt2.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -34,7 +34,13 @@
|
|
|
24be4e6 |
#include "hbook/hcrecv.inc"
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
CHARACTER*(*) VAR1(*)
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+ INTEGER*8 IVOFF(*), IOFFST, IOFFSTT
|
|
|
24be4e6 |
+ INTEGER IOFFSTV(2)
|
|
|
24be4e6 |
+ EQUIVALENCE (IOFFSTV, IOFFSTT)
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
INTEGER IVOFF(*)
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
CHARACTER*32 VAR
|
|
|
24be4e6 |
INTEGER ILOGIC, HNMPTR
|
|
|
24be4e6 |
LOGICAL LOGIC, INDVAR, ALLVAR, USEBUF, CHKOFF
|
|
|
24be4e6 |
@@ -452,12 +458,21 @@
|
|
|
24be4e6 |
IQ(LTMP1+JTMP+1) = IOFF
|
|
|
24be4e6 |
IF (USEBUF) THEN
|
|
|
24be4e6 |
IF (IEDIF .EQ. 0) THEN
|
|
|
24be4e6 |
- IQ(LTMP1+JTMP+2) = IOFFST
|
|
|
24be4e6 |
+ IOFFSTT = IOFFST
|
|
|
24be4e6 |
ELSE
|
|
|
24be4e6 |
- IQ(LTMP1+JTMP+2) = IOFFST + (IEDIF*ISHFT(ISIZE,-2))
|
|
|
24be4e6 |
+ IOFFSTT = IOFFST + (IEDIF*ISHFT(ISIZE,-2))
|
|
|
24be4e6 |
ENDIF
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+2) = IOFFSTT
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+* store upper part of 64 bit address
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+3) = IOFFSTV(2)
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
ELSE
|
|
|
24be4e6 |
IQ(LTMP1+JTMP+2) = 0
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+* reset upper part of 64 bit address
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+3) = 0
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
ENDIF
|
|
|
24be4e6 |
LQ(LTMP1-IQ(LTMP1+1)) = LBLOK
|
|
|
24be4e6 |
*
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgntbf.F cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgntbf.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgntbf.F 1996-01-16 17:07:57.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgntbf.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -26,3 +26,13 @@
|
|
|
24be4e6 |
CALL HGNT1(IDN, '*', VAR, IOFFST, NVAR1, IDNEVT, IERROR)
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
END
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+* 64-bit version (separate to preserve ABI compatibility)
|
|
|
24be4e6 |
+ SUBROUTINE HGNTBF64(IDN,VAR,IOFFST,NVAR,IDNEVT,IERROR)
|
|
|
24be4e6 |
+ CHARACTER*(*) VAR(*)
|
|
|
24be4e6 |
+ INTEGER*8 IOFFST(*)
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ NVAR1 = -NVAR
|
|
|
24be4e6 |
+ CALL HGNT1(IDN, '*', VAR, IOFFST, NVAR1, IDNEVT, IERROR)
|
|
|
24be4e6 |
+*
|
|
|
24be4e6 |
+ END
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgntf.F cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgntf.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/hbook/hntup/hgntf.F 1999-03-05 15:42:35.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/hbook/hntup/hgntf.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -37,6 +37,13 @@
|
|
|
24be4e6 |
INTEGER ILOGIC
|
|
|
24be4e6 |
LOGICAL LOGIC, INDVAR, USEBUF
|
|
|
24be4e6 |
EQUIVALENCE (LOGIC, ILOGIC)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+ INTEGER*8 IOFFST, IOFFSTT
|
|
|
24be4e6 |
+ INTEGER IOFFSTV(2)
|
|
|
24be4e6 |
+ EQUIVALENCE (IOFFSTV, IOFFSTT)
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
#include "hbook/jbyt.inc"
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
@@ -76,6 +83,12 @@
|
|
|
24be4e6 |
INDX = IQ(LTMP1+JTMP)
|
|
|
24be4e6 |
IOFF = IQ(LTMP1+JTMP+1)
|
|
|
24be4e6 |
IOFFST = IQ(LTMP1+JTMP+2)
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+* fetch full 64 bit address
|
|
|
24be4e6 |
+ IOFFSTV(1) = IQ(LTMP1+JTMP+2)
|
|
|
24be4e6 |
+ IOFFSTV(2) = IQ(LTMP1+JTMP+3)
|
|
|
24be4e6 |
+ IOFFST = IOFFSTT
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
IF (IOFFST .EQ. 0) THEN
|
|
|
24be4e6 |
USEBUF = .FALSE.
|
|
|
24be4e6 |
ELSE
|
|
|
24be4e6 |
@@ -442,12 +455,21 @@
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
IF (USEBUF) THEN
|
|
|
24be4e6 |
IF (IEDIF .EQ. 0) THEN
|
|
|
24be4e6 |
- IQ(LTMP1+JTMP+2) = IOFFST
|
|
|
24be4e6 |
+ IOFFSTT = IOFFST
|
|
|
24be4e6 |
ELSE
|
|
|
24be4e6 |
- IQ(LTMP1+JTMP+2) = IOFFST + (IEDIF*ISHFT(ISIZE,-2))
|
|
|
24be4e6 |
+ IOFFSTT = IOFFST + (IEDIF*ISHFT(ISIZE,-2))
|
|
|
24be4e6 |
ENDIF
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+2) = IOFFSTT
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+* store upper part of 64 bit address
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+3) = IOFFSTV(2)
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
ELSE
|
|
|
24be4e6 |
IQ(LTMP1+JTMP+2) = 0
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+* reset upper part of 64 bit address
|
|
|
24be4e6 |
+ IQ(LTMP1+JTMP+3) = 0
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
ENDIF
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
40 CONTINUE
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/Imakefile cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/Imakefile
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/Imakefile 2002-09-19 16:44:52.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/Imakefile 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -11,6 +11,10 @@
|
|
|
24be4e6 |
sleepf.c signalf.c sigprnt.c sigunbl.c stati.c systei.c \ @@\
|
|
|
24be4e6 |
tminit.c unlini.c tmread.c
|
|
|
24be4e6 |
|
|
|
24be4e6 |
+#ifdef CERNLIB_QMLXIA64
|
|
|
24be4e6 |
+SRCS_C += chkloc.c
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
#ifndef CERNLIB_OS9
|
|
|
24be4e6 |
SRCS_C += timel.c lstati.c
|
|
|
24be4e6 |
#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/chkloc.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/chkloc.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/chkloc.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/chkloc.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -0,0 +1,10 @@
|
|
|
24be4e6 |
+/*
|
|
|
24be4e6 |
+ * Utility routine for locf and locb
|
|
|
24be4e6 |
+ * H. Vogt (harald.vogt@desy.de)
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ */
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+#include "lp64gs/chkloc.c"
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
+
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/jumptn.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/jumptn.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/jumptn.c 2004-07-29 14:07:43.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/jumptn.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -20,8 +20,10 @@
|
|
|
24be4e6 |
*/
|
|
|
24be4e6 |
#include "kerngen/pilot.h"
|
|
|
24be4e6 |
|
|
|
24be4e6 |
-#if defined(CERNLIB_QMLXIA64)||defined(CERNLIB_QMVAOS)
|
|
|
24be4e6 |
-#include "vaogs/jumptn.c"
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMVAOS)
|
|
|
24be4e6 |
+#include "vaogs/jumptn.c"
|
|
|
24be4e6 |
+#elif defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+#include "lp64gs/jumptn.c"
|
|
|
24be4e6 |
#else
|
|
|
24be4e6 |
/*> ROUTINE JUMPTN
|
|
|
24be4e6 |
CERN PROGLIB# Z043 JUMPTN .VERSION KERNFOR 4.40 940929
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/jumpxn.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/jumpxn.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/jumpxn.c 2004-07-29 14:07:43.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/jumpxn.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -20,8 +20,10 @@
|
|
|
24be4e6 |
*/
|
|
|
24be4e6 |
#include "kerngen/pilot.h"
|
|
|
24be4e6 |
|
|
|
24be4e6 |
-#if defined(CERNLIB_QMLXIA64)||defined(CERNLIB_QMVAOS)
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMVAOS)
|
|
|
24be4e6 |
#include "vaogs/jumpxn.c"
|
|
|
24be4e6 |
+#elif defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+#include "lp64gs/jumpxn.c"
|
|
|
24be4e6 |
#else
|
|
|
24be4e6 |
/*> ROUTINE JUMPXN
|
|
|
24be4e6 |
CERN PROGLIB# Z042 JUMPXN .VERSION KERNFOR 4.40 940929
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lenocc.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lenocc.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lenocc.c 1997-10-23 16:25:11.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lenocc.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -46,7 +46,7 @@
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/* look at the last ntail characters */
|
|
|
24be4e6 |
|
|
|
24be4e6 |
- ntail = ((int)chcur & 3);
|
|
|
24be4e6 |
+ ntail = ((unsigned long)chcur & 3);
|
|
|
24be4e6 |
for (i = ntail; i > 0; i--)
|
|
|
24be4e6 |
{ if (*--chcur != ' ') goto exit; }
|
|
|
24be4e6 |
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/locb.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/locb.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/locb.c 1997-09-02 14:26:37.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/locb.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -26,6 +26,9 @@
|
|
|
24be4e6 |
# define DummyDef
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+#include "lp64gs/locb.c"
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/*> ROUTINE LOCB
|
|
|
24be4e6 |
CERN PROGLIB# N101 LOCB .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
@@ -47,6 +50,8 @@
|
|
|
24be4e6 |
return( (int) iadr );
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
/*> END <----------------------------------------------------------*/
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
#ifdef CERNLIB_TCGEN_LOCB
|
|
|
24be4e6 |
#undef CERNLIB_TCGEN_LOCB
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
+
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/locf.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/locf.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/locf.c 2004-07-29 14:06:07.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/locf.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -50,6 +50,8 @@
|
|
|
24be4e6 |
#include "irtdgs/locf.c"
|
|
|
24be4e6 |
#elif defined(CERNLIB_QMVAOS)
|
|
|
24be4e6 |
#include "vaogs/locf.c"
|
|
|
24be4e6 |
+#elif defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+#include "lp64gs/locf.c"
|
|
|
24be4e6 |
#else
|
|
|
24be4e6 |
/*> ROUTINE LOCF
|
|
|
24be4e6 |
CERN PROGLIB# N100 LOCF .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
@@ -68,25 +70,7 @@
|
|
|
24be4e6 |
DummyDef
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
-#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
- const unsigned long long int mask=0x00000000ffffffff;
|
|
|
24be4e6 |
- static unsigned long long int base=1;
|
|
|
24be4e6 |
- unsigned long long int jadr=(unsigned long long int) iadr;
|
|
|
24be4e6 |
- unsigned long long int jadrl = ((mask & jadr) >> LADUPW);
|
|
|
24be4e6 |
-
|
|
|
24be4e6 |
- if (base == 1) {
|
|
|
24be4e6 |
- base = (~mask & jadr);
|
|
|
24be4e6 |
- } else if(base != (~mask & jadr)) {
|
|
|
24be4e6 |
- printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
- printf("locf_() Warning: changing base from %lx to %lx!!!\n",
|
|
|
24be4e6 |
- base, (~mask & jadr));
|
|
|
24be4e6 |
- printf("This may result in program crash or incorrect results\n");
|
|
|
24be4e6 |
- printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
- }
|
|
|
24be4e6 |
- return ((unsigned) jadrl);
|
|
|
24be4e6 |
-#else
|
|
|
24be4e6 |
return( ((unsigned) iadr) >> LADUPW );
|
|
|
24be4e6 |
-#endif
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
#undef Dummy2LocPar
|
|
|
24be4e6 |
#undef DummyDef
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/chkloc.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/chkloc.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/chkloc.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/chkloc.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -0,0 +1,58 @@
|
|
|
24be4e6 |
+/*
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ * Revision 1.1.1.1 2006/06/14
|
|
|
24be4e6 |
+ * Kernlib utility for locf, locb on LP64 architectures H. Vogt
|
|
|
24be4e6 |
+ * (AMD64/Intel EM64T and IA64)
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ */
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#include <stdio.h>
|
|
|
24be4e6 |
+#include <stdlib.h>
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+/*> ROUTINE LOCF
|
|
|
24be4e6 |
+ CERN PROGLIB# N100 LOCF .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+/*> ROUTINE LOCB
|
|
|
24be4e6 |
+ CERN PROGLIB# N101 LOCB .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+unsigned int chkloc(iadr)
|
|
|
24be4e6 |
+ char *iadr;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ /* 64 bit architectures may exceed the 32 bit address space ! */
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+ /* AMD64/Intel EM64T architectures have the dynamic segments above
|
|
|
24be4e6 |
+ 0x80000000000 and the stack immediately below this whereas the text and
|
|
|
24be4e6 |
+ data segments are staring from 0x400000. The implementations address
|
|
|
24be4e6 |
+ space is limited to 0x00007fffffffffff.
|
|
|
24be4e6 |
+ Allocated memory with malloc/calloc is starting from the end of text and
|
|
|
24be4e6 |
+ data segments upwards.
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+ IA64 architectures have the dynamic segments are above 0x2000000000000000,
|
|
|
24be4e6 |
+ the stack is above 0x8000000000000000, the data segments starts at
|
|
|
24be4e6 |
+ 0x6000000000000000 and the text segments start at 0x4000000000000000
|
|
|
24be4e6 |
+ Allocated memory with malloc/calloc is starting from the end of
|
|
|
24be4e6 |
+ data segments upwards. All addresses here are expected to be in
|
|
|
24be4e6 |
+ the data segment area. */
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+ const unsigned long mask=0xffffffff00000000;
|
|
|
24be4e6 |
+ static unsigned long limit=0x00000000ffffffff;
|
|
|
24be4e6 |
+ unsigned long jadr=((unsigned long) iadr & mask);
|
|
|
24be4e6 |
+#if !defined (__ia64__)
|
|
|
24be4e6 |
+ if ( jadr != 0x0000000000000000) {
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
+ if ( jadr != 0x6000000000000000) {
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
+ fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
+ fprintf(stderr, "LOCB/LOCF: address %p exceeds the 32 bit address space\n", iadr);
|
|
|
24be4e6 |
+ fprintf(stderr, "or is not in the data segments\n");
|
|
|
24be4e6 |
+ fprintf(stderr, "This may result in program crash or incorrect results\n");
|
|
|
24be4e6 |
+ fprintf(stderr, "Therefore we will stop here\n");
|
|
|
24be4e6 |
+ fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
+ exit (999);
|
|
|
24be4e6 |
+ }
|
|
|
24be4e6 |
+ jadr=((unsigned long) iadr & limit);
|
|
|
24be4e6 |
+ return ((unsigned) jadr);
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+/*> END <----------------------------------------------------------*/
|
|
|
24be4e6 |
+
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumptn.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumptn.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumptn.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumptn.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -0,0 +1,83 @@
|
|
|
24be4e6 |
+/*
|
|
|
24be4e6 |
+ * $Id: jumptn.c,v 1.1.1.1 1996/02/15 17:49:32 mclareni Exp $
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ * $Log: jumptn.c,v $
|
|
|
24be4e6 |
+ * Revision 1.1.1.1 1996/02/15 17:49:32 mclareni
|
|
|
24be4e6 |
+ * Kernlib
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ */
|
|
|
24be4e6 |
+/*> ROUTINE JUMPTN
|
|
|
24be4e6 |
+ CERN PROGLIB# Z043 JUMPTN .VERSION KERNLP64 1.00 060717
|
|
|
24be4e6 |
+ Copy of JUMPTN .VERSION KERNVMI 1.09 940531
|
|
|
24be4e6 |
+ ORIG. 21/04/88 JZ+FCA
|
|
|
24be4e6 |
+C
|
|
|
24be4e6 |
+C- To transfer to the user routine TARGET (say) with 2 parameters
|
|
|
24be4e6 |
+C- two steps are needed :
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+C- 1) EXTERNAL TARGET to get the address of TARGET
|
|
|
24be4e6 |
+C- IADR = JUMPAD (TARGET)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+C- 3) CALL JUMPT2 (IADR,par1,par2) to transfer
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+#define jumpt0 jumpt0_
|
|
|
24be4e6 |
+#define jumpt1 jumpt1_
|
|
|
24be4e6 |
+#define jumpt2 jumpt2_
|
|
|
24be4e6 |
+#define jumpt3 jumpt3_
|
|
|
24be4e6 |
+#define jumpt4 jumpt4_
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+extern int jumpad_();
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+static void (*jumpto)();
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+void jumpt0(iadr)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long func;
|
|
|
24be4e6 |
+ func = *iadr + (long)jumpad_;
|
|
|
24be4e6 |
+ jumpto = (void(*)()) func;
|
|
|
24be4e6 |
+ jumpto();
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+void jumpt1(iadr,ipara)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+ char *ipara;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long func;
|
|
|
24be4e6 |
+ func = *iadr + (long)jumpad_;
|
|
|
24be4e6 |
+ jumpto = (void(*)()) func;
|
|
|
24be4e6 |
+ jumpto (ipara);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+void jumpt2(iadr, ipara, iparb)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+ char *ipara, *iparb;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long func;
|
|
|
24be4e6 |
+ func = *iadr + (long)jumpad_;
|
|
|
24be4e6 |
+ jumpto = (void(*)()) func;
|
|
|
24be4e6 |
+ jumpto (ipara, iparb);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+void jumpt3(iadr, ipara, iparb, iparc)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+ char *ipara, *iparb, *iparc;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long func;
|
|
|
24be4e6 |
+ func = *iadr + (long)jumpad_;
|
|
|
24be4e6 |
+ jumpto = (void(*)()) func;
|
|
|
24be4e6 |
+ jumpto (ipara, iparb, iparc);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+void jumpt4(iadr, ipara, iparb, iparc, ipard)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+ char *ipara, *iparb, *iparc, *ipard;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long func;
|
|
|
24be4e6 |
+ func = *iadr + (long)jumpad_;
|
|
|
24be4e6 |
+ jumpto = (void(*)()) func;
|
|
|
24be4e6 |
+ jumpto (ipara, iparb, iparc, ipard);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+/*> END <----------------------------------------------------------*/
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumpxn.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumpxn.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumpxn.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/jumpxn.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -0,0 +1,92 @@
|
|
|
24be4e6 |
+/*
|
|
|
24be4e6 |
+ * $Id: jumpxn.c,v 1.1.1.1 1996/02/15 17:49:32 mclareni Exp $
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ * $Log: jumpxn.c,v $
|
|
|
24be4e6 |
+ * Revision 1.1.1.1 1996/02/15 17:49:32 mclareni
|
|
|
24be4e6 |
+ * Kernlib
|
|
|
24be4e6 |
+ *
|
|
|
24be4e6 |
+ */
|
|
|
24be4e6 |
+/*> ROUTINE JUMPXN
|
|
|
24be4e6 |
+ CERN PROGLIB# Z043 JUMPXN .VERSION KERNLP64 1.00 060717
|
|
|
24be4e6 |
+ Copy of JUMPXN .VERSION KERNVMI 1.08 930527
|
|
|
24be4e6 |
+ ORIG. 21/04/88 JZ+FCA, adapted 11/05/93 AP+JZ
|
|
|
24be4e6 |
+C
|
|
|
24be4e6 |
+C- To transfer to the user routine TARGET (say) with 2 parameters
|
|
|
24be4e6 |
+C- three steps are needed :
|
|
|
24be4e6 |
+C- Check that relative jump addresses fits into 32 bits
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+C- 1) EXTERNAL TARGET to get the address of TARGET
|
|
|
24be4e6 |
+C- IADR = JUMPAD (TARGET)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+C- 2) CALL JUMPST (IADR) to set the tranfer address
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+C- 3) CALL JUMPX2 (par1,par2) to transfer
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#include "stdio.h"
|
|
|
24be4e6 |
+#include <stdlib.h>
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+static void (*tarsub)();
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+/* ---- jumpad --------------------------------------------- */
|
|
|
24be4e6 |
+int jumpad_(ifun)
|
|
|
24be4e6 |
+ char *ifun;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long temp;
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+ temp = (long)ifun - (long)jumpad_;
|
|
|
24be4e6 |
+ if (labs(temp) > 0x3fffffff) {
|
|
|
24be4e6 |
+ printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
+ printf("JUMPAD: address %p exceeds the 32 bit address space\n", temp);
|
|
|
24be4e6 |
+ printf("This may result in program crash or incorrect results\n");
|
|
|
24be4e6 |
+ printf("Therefore we will stop here\n");
|
|
|
24be4e6 |
+ printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
24be4e6 |
+ exit (999);
|
|
|
24be4e6 |
+ }
|
|
|
24be4e6 |
+ return (int) temp;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+/* ---- jumpst --------------------------------------------- */
|
|
|
24be4e6 |
+void jumpst_(iadr)
|
|
|
24be4e6 |
+ int *iadr;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long true;
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+ true = (long)jumpad_;
|
|
|
24be4e6 |
+ true = true + *iadr;
|
|
|
24be4e6 |
+ tarsub = (void (*)())true;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+/* ---- jumpxn --------------------------------------------- */
|
|
|
24be4e6 |
+void jumpx0_()
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ (*tarsub)();
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+void jumpx1_(ipara)
|
|
|
24be4e6 |
+ char *ipara;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ (*tarsub)(ipara);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+void jumpx2_(ipara, iparb)
|
|
|
24be4e6 |
+ char *ipara, *iparb;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ (*tarsub)(ipara, iparb);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+void jumpx3_(ipara, iparb, iparc)
|
|
|
24be4e6 |
+ char *ipara, *iparb, *iparc;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ (*tarsub)(ipara, iparb, iparc);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+void jumpx4_(ipara, iparb, iparc, ipard)
|
|
|
24be4e6 |
+ char *ipara, *iparb, *iparc, *ipard;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ (*tarsub)(ipara, iparb, iparc, ipard);
|
|
|
24be4e6 |
+ return;
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+/*> END <----------------------------------------------------------*/
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/locb.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/locb.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/locb.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/locb.c 2007-12-14 21:52:38.000000000 +0000
|
|
|
db20d4b |
@@ -0,0 +1,37 @@
|
|
|
24be4e6 |
+/*> ROUTINE LOCB
|
|
|
24be4e6 |
+ CERN PROGLIB# N101 LOCB .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+unsigned int chkloc(char *address);
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+unsigned int locb_(iadr)
|
|
|
24be4e6 |
+ char *iadr;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ return (chkloc(iadr));
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+
|
|
|
db20d4b |
+#include <stdint.h> /* for ptrdiff_t, size_t */
|
|
|
db20d4b |
+#include <stdio.h> /* for fprintf */
|
|
|
db20d4b |
+#include <stdlib.h> /* for exit */
|
|
|
db20d4b |
+
|
|
|
db20d4b |
+int iptrdiff_(iadr1, iadr2)
|
|
|
db20d4b |
+ char * iadr1, * iadr2;
|
|
|
db20d4b |
+{
|
|
|
db20d4b |
+ long diff = (long)iadr1 - (long)iadr2;
|
|
|
db20d4b |
+ if (diff < (long)INT32_MIN || diff > (long)INT32_MAX) {
|
|
|
db20d4b |
+ fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
db20d4b |
+ fprintf(stderr, "IPTRDIFF: difference of addresses %p and %p\n", iadr1, iadr2);
|
|
|
db20d4b |
+ fprintf(stderr, "cannot be stored in 32-bit signed integer!\n");
|
|
|
db20d4b |
+ fprintf(stderr, "This may result in program crash or incorrect results\n");
|
|
|
db20d4b |
+ fprintf(stderr, "Therefore we will stop here\n");
|
|
|
db20d4b |
+ fprintf(stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
|
|
db20d4b |
+ exit (999);
|
|
|
db20d4b |
+ }
|
|
|
db20d4b |
+ else return (int)diff;
|
|
|
db20d4b |
+}
|
|
|
db20d4b |
+
|
|
|
db20d4b |
+int iptrsame_(iadr1, iadr2)
|
|
|
db20d4b |
+ char * iadr1, * iadr2;
|
|
|
db20d4b |
+{
|
|
|
db20d4b |
+ return (size_t)iadr1 == (size_t)iadr2 ? 1 : 0;
|
|
|
db20d4b |
+}
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/locf.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/locf.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/lp64gs/locf.c 1970-01-01 00:00:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/lp64gs/locf.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -0,0 +1,10 @@
|
|
|
24be4e6 |
+/*> ROUTINE LOCF
|
|
|
24be4e6 |
+ CERN PROGLIB# N100 LOCF .VERSION KERNFOR 4.36 930602
|
|
|
24be4e6 |
+*/
|
|
|
24be4e6 |
+unsigned int chkloc(char *address);
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+unsigned int locf_(iadr)
|
|
|
24be4e6 |
+ char *iadr;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ return ( (chkloc(iadr)) >> 2 );
|
|
|
24be4e6 |
+}
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/signalf.c cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/signalf.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kernlib/kerngen/ccgen/signalf.c 1999-10-06 14:17:01.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kernlib/kerngen/ccgen/signalf.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -45,6 +45,7 @@
|
|
|
24be4e6 |
C- function value = adr of previous handler
|
|
|
24be4e6 |
*/
|
|
|
24be4e6 |
#include <signal.h>
|
|
|
24be4e6 |
+typedef void (*sighandler_t)(int);
|
|
|
24be4e6 |
#if defined(CERNLIB_QX_SC)
|
|
|
24be4e6 |
int type_of_call signalf_(signum,funct,flag)
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
@@ -58,7 +59,7 @@
|
|
|
24be4e6 |
int *funct;
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
int signo, istat;
|
|
|
24be4e6 |
- int handler;
|
|
|
24be4e6 |
+ sighandler_t handler;
|
|
|
24be4e6 |
void *oldhand;
|
|
|
24be4e6 |
|
|
|
24be4e6 |
signo = *signum;
|
|
|
24be4e6 |
@@ -67,14 +68,15 @@
|
|
|
24be4e6 |
if (*flag < 0) handler = *funct;
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
#if !defined(CERNLIB_QCCINDAD)
|
|
|
24be4e6 |
- if (*flag < 0) handler = (int)funct;
|
|
|
24be4e6 |
+ if (*flag < 0) handler = (sighandler_t)funct;
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
- else if (*flag == 0) handler = (int)SIG_DFL;
|
|
|
24be4e6 |
- else if (*flag == 1) handler = (int)SIG_IGN;
|
|
|
24be4e6 |
- else handler = *flag;
|
|
|
24be4e6 |
+ else if (*flag == 0) handler = (sighandler_t)SIG_DFL;
|
|
|
24be4e6 |
+ else if (*flag == 1) handler = (sighandler_t)SIG_IGN;
|
|
|
24be4e6 |
+ else handler = (sighandler_t)(long)*flag;
|
|
|
24be4e6 |
|
|
|
24be4e6 |
oldhand = signal(signo,handler);
|
|
|
24be4e6 |
- istat = (int)oldhand;
|
|
|
24be4e6 |
+ unsigned long myistat = (unsigned long)oldhand;
|
|
|
24be4e6 |
+ istat = (int)myistat;
|
|
|
24be4e6 |
#ifndef __GNUC__
|
|
|
24be4e6 |
if (oldhand == SIG_ERR) istat = -1;
|
|
|
24be4e6 |
#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_kuip/kkern.c cernlib-2006.dfsg.2/src/packlib/kuip/code_kuip/kkern.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_kuip/kkern.c 1996-05-01 12:08:38.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_kuip/kkern.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -39,7 +39,8 @@
|
|
|
24be4e6 |
if( len >= (sizeof blanks) * 4 ) {
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/* check single characters until next word boundary */
|
|
|
24be4e6 |
- switch( (int)&str[len] & ( (sizeof blanks) - 1 ) ) {
|
|
|
24be4e6 |
+ /* use type long here to be conform with 64 bit architectures*/
|
|
|
24be4e6 |
+ switch( (long)&str[len] & ( (sizeof blanks) - 1 ) ) {
|
|
|
24be4e6 |
case 7:
|
|
|
24be4e6 |
if( str[--len] != ' ' ) return len + 1;
|
|
|
24be4e6 |
case 6:
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/kmbrow.c cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/kmbrow.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/kmbrow.c 1996-03-08 15:33:08.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/kmbrow.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -278,7 +278,7 @@
|
|
|
24be4e6 |
char *path, *title;
|
|
|
24be4e6 |
char cval[MAX_string], cval1[MAX_string];
|
|
|
24be4e6 |
int i, fitem, fcnt, dcnt, icon_type;
|
|
|
24be4e6 |
- int browser_count = 0;
|
|
|
24be4e6 |
+ long browser_count = 0;
|
|
|
24be4e6 |
|
|
|
24be4e6 |
BrObject *brobj;
|
|
|
24be4e6 |
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/kuxxt.c cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/kuxxt.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/kuxxt.c 1996-03-08 15:33:11.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/kuxxt.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -340,7 +340,7 @@
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
(void) XDeleteContext( XtDisplay( UxTopLevel ),
|
|
|
24be4e6 |
(Window) wgt,
|
|
|
24be4e6 |
- (XContext) client_data );
|
|
|
24be4e6 |
+ (XContext) (long)client_data );
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/******************************************************************************
|
|
|
24be4e6 |
@@ -385,7 +385,7 @@
|
|
|
24be4e6 |
return ( UX_ERROR );
|
|
|
24be4e6 |
|
|
|
24be4e6 |
XtAddCallback (wgt, XmNdestroyCallback,
|
|
|
24be4e6 |
- UxDeleteContextCB, (XtPointer) xcontext_id);
|
|
|
24be4e6 |
+ UxDeleteContextCB, (XtPointer) (long)xcontext_id);
|
|
|
24be4e6 |
|
|
|
24be4e6 |
return ( UX_NO_ERROR );
|
|
|
24be4e6 |
}
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkdcmp.c cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkdcmp.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkdcmp.c 1996-03-15 15:54:00.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkdcmp.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -1541,7 +1541,11 @@
|
|
|
24be4e6 |
|
|
|
24be4e6 |
Widget cpanel = stag->command_panel;
|
|
|
24be4e6 |
KmCommand *cmd = stag->cmd;
|
|
|
24be4e6 |
- int ipar = stag->index;
|
|
|
24be4e6 |
+ /* for 64 bit compatibility take long here
|
|
|
24be4e6 |
+ * int ipar = stag->index;
|
|
|
24be4e6 |
+ */
|
|
|
24be4e6 |
+ long ipar = stag->index;
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
KmParameter *par = cmd->par[ipar];
|
|
|
24be4e6 |
KmParFile *pfil = par->ptype;
|
|
|
24be4e6 |
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkdgra.c cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkdgra.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkdgra.c 1996-03-08 15:33:07.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkdgra.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -289,11 +289,12 @@
|
|
|
24be4e6 |
km_graph_init_callbacks (km_graphicsDraw, graph_widget, wkid, 0);
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
|
|
|
24be4e6 |
-void km_graph_init_callbacks (draw, graph_widget, wkid, flag)
|
|
|
24be4e6 |
+void km_graph_init_callbacks (draw, graph_widget, mywkid, flag)
|
|
|
24be4e6 |
Widget draw, graph_widget;
|
|
|
24be4e6 |
- int wkid, flag;
|
|
|
24be4e6 |
+ int mywkid, flag;
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
/* Add drawing area expose and resize callbacks */
|
|
|
24be4e6 |
+ long wkid = mywkid;
|
|
|
24be4e6 |
if (flag == 0) {
|
|
|
24be4e6 |
XtAddCallback(draw, XmNexposeCallback,
|
|
|
24be4e6 |
(XtCallbackProc)drawing_area_callback, graph_widget);
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkuip.c cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkuip.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/code_motif/mkuip.c 2007-12-14 21:41:17.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/code_motif/mkuip.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -1687,7 +1687,7 @@
|
|
|
24be4e6 |
XmStringFree(xmstr);
|
|
|
24be4e6 |
} /* end for ... */
|
|
|
24be4e6 |
XtAddCallback (km_listSBox,XmNokCallback,
|
|
|
24be4e6 |
- (XtCallbackProc)kuipList_OK, (XtPointer)flag);
|
|
|
24be4e6 |
+ (XtCallbackProc)kuipList_OK, (XtPointer) (long)flag);
|
|
|
24be4e6 |
XtAddCallback (km_listSBox,XmNcancelCallback,
|
|
|
24be4e6 |
(XtCallbackProc)destroy_list_id, NULL);
|
|
|
24be4e6 |
XtAddCallback (km_listSBox,XmNhelpCallback,
|
|
|
24be4e6 |
@@ -1914,7 +1914,7 @@
|
|
|
24be4e6 |
PdMenu = XmCreatePushButtonGadget
|
|
|
24be4e6 |
(kuipControlShellM,appShell_title[i],arglist,0);
|
|
|
24be4e6 |
XtAddCallback(PdMenu,XmNactivateCallback,
|
|
|
24be4e6 |
- (XtCallbackProc)appShell_activate, (XtPointer)i);
|
|
|
24be4e6 |
+ (XtCallbackProc)appShell_activate, (XtPointer) (long)i);
|
|
|
24be4e6 |
XtManageChild(PdMenu);
|
|
|
24be4e6 |
break;
|
|
|
24be4e6 |
} /* end ... if (appShell[i] == NULL) */
|
|
|
24be4e6 |
@@ -1972,7 +1972,7 @@
|
|
|
24be4e6 |
PdMenu = XmCreatePushButtonGadget
|
|
|
24be4e6 |
(kuipControlShellM,appShell_title[i],arglist,0);
|
|
|
24be4e6 |
XtAddCallback (PdMenu,XmNactivateCallback,
|
|
|
24be4e6 |
- (XtCallbackProc)appShell_activate, (XtPointer)i);
|
|
|
24be4e6 |
+ (XtCallbackProc)appShell_activate, (XtPointer) (long)i);
|
|
|
24be4e6 |
XtManageChild(PdMenu);
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
}
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/help.c cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/help.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/help.c 1996-03-08 15:33:04.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/help.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -309,7 +309,7 @@
|
|
|
24be4e6 |
int *type;
|
|
|
24be4e6 |
XmAnyCallbackStruct *call_data;
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
- int t = (int)type;
|
|
|
24be4e6 |
+ long t = (long)type;
|
|
|
24be4e6 |
|
|
|
24be4e6 |
if (help[t])
|
|
|
24be4e6 |
XRaiseWindow(XtDisplay(help[t]), XtWindow(help[t]));
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/kxterm.c cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/kxterm.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/kxterm.c 2005-04-18 15:40:49.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/kxterm.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -1533,7 +1533,7 @@
|
|
|
24be4e6 |
XtPointer cbs;
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
Widget text_w;
|
|
|
24be4e6 |
- int i = (int) item;
|
|
|
24be4e6 |
+ unsigned long i = (unsigned long) item;
|
|
|
24be4e6 |
Boolean result = True;
|
|
|
24be4e6 |
|
|
|
24be4e6 |
text_w = get_selection_owner(widget);
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/uxxt.c cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/uxxt.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/kuip/programs/kxterm/uxxt.c 1996-03-08 15:33:04.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/kuip/programs/kxterm/uxxt.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -340,7 +340,7 @@
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
(void) XDeleteContext( XtDisplay( UxTopLevel ),
|
|
|
24be4e6 |
(Window) wgt,
|
|
|
24be4e6 |
- (XContext) client_data );
|
|
|
24be4e6 |
+ (XContext) (long)client_data );
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/******************************************************************************
|
|
|
24be4e6 |
@@ -385,7 +385,7 @@
|
|
|
24be4e6 |
return ( UX_ERROR );
|
|
|
24be4e6 |
|
|
|
24be4e6 |
XtAddCallback (wgt, XmNdestroyCallback,
|
|
|
24be4e6 |
- UxDeleteContextCB, (XtPointer) xcontext_id);
|
|
|
24be4e6 |
+ UxDeleteContextCB, (XtPointer) (long)xcontext_id);
|
|
|
24be4e6 |
|
|
|
24be4e6 |
return ( UX_NO_ERROR );
|
|
|
24be4e6 |
}
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/zbook/code/zerror.F cernlib-2006.dfsg.2/src/packlib/zbook/code/zerror.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/zbook/code/zerror.F 1996-03-08 12:01:12.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/zbook/code/zerror.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -16,6 +16,10 @@
|
|
|
24be4e6 |
C ******************************************************************
|
|
|
24be4e6 |
C
|
|
|
24be4e6 |
DIMENSION IZ(1),KEY(1),LAB(6),ID(1)
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+ INTEGER*8 JUMPADR
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
C
|
|
|
24be4e6 |
C ------------------------------------------------------------------
|
|
|
24be4e6 |
C
|
|
|
24be4e6 |
@@ -24,7 +28,7 @@
|
|
|
24be4e6 |
NEWERR = IERR
|
|
|
24be4e6 |
JZ = IZ(1)
|
|
|
24be4e6 |
IF(IZ(JZ+19).EQ.0) CALL ZUSER(IZ,NEWERR,KEY,ID)
|
|
|
24be4e6 |
-#if (defined(CERNLIB_SINGLE)||defined(CERNLIB_DOUBLE)||defined(CERNLIB_UNIVAC)||defined(CERNLIB_PDP10))&&(!defined(CERNLIB_VAX))&&(!defined(CERNLIB_BESM6))
|
|
|
24be4e6 |
+#if (defined(CERNLIB_SINGLE)||defined(CERNLIB_DOUBLE)||defined(CERNLIB_UNIVAC)||defined(CERNLIB_PDP10))&&(!defined(CERNLIB_VAX))&&(!defined(CERNLIB_BESM6))&&(!defined(CERNLIB_QMLXIA64))
|
|
|
24be4e6 |
IF(IZ(JZ+19).NE.0) CALL ZJUMP(IZ(JZ+19),IZ,NEWERR,KEY,ID)
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
#if defined(CERNLIB_VAX)
|
|
|
24be4e6 |
@@ -33,6 +37,13 @@
|
|
|
24be4e6 |
#if defined(CERNLIB_BESM6)
|
|
|
24be4e6 |
IF(IZ(JZ+19).NE.0) CALL ZJUMP(IZ,NEWERR,KEY,ID,IZ(JZ+19))
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+ IF(IZ(JZ+19).NE.0) THEN
|
|
|
24be4e6 |
+ JUMPADR = IZ(JZ+19)
|
|
|
24be4e6 |
+ print '(a,z17)','JUMPADR is:', JUMPADR
|
|
|
24be4e6 |
+ CALL JUMPT4(JUMPADR,IZ,NEWERR,KEY,ID)
|
|
|
24be4e6 |
+ END IF
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
C
|
|
|
24be4e6 |
IF (NEWERR.LE.0)RETURN
|
|
|
24be4e6 |
C
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/zbook/code/zjump.c cernlib-2006.dfsg.2/src/packlib/zbook/code/zjump.c
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/zbook/code/zjump.c 1996-03-08 12:01:12.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/zbook/code/zjump.c 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -7,6 +7,9 @@
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
*/
|
|
|
24be4e6 |
#include "zbook/pilot_c.h"
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+static void (*target)();
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
#if defined(CERNLIB_UNIX)
|
|
|
24be4e6 |
#if defined(CERNLIB_QX_SC)
|
|
|
24be4e6 |
zjump_(name,p1,p2,p3,p4)
|
|
|
24be4e6 |
@@ -18,8 +21,23 @@
|
|
|
24be4e6 |
ZJUMP(name,p1,p2,p3,p4)
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
char *p1, *p2, *p3, *p4;
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+/* LP64 compatibility:
|
|
|
24be4e6 |
+ name is taken from a Fortran array and therefore its address is 32 bit
|
|
|
24be4e6 |
+ which has to be converted to a 64 bit address to satisfy void (*) (H. Vogt) */
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+int *name;
|
|
|
24be4e6 |
+{
|
|
|
24be4e6 |
+ long jadr;
|
|
|
24be4e6 |
+ jadr = *name; /* convert int to long */
|
|
|
24be4e6 |
+ target = (void (*)())jadr;
|
|
|
24be4e6 |
+ (*target)(p1, p2, p3, p4);
|
|
|
24be4e6 |
+}
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
void (**name)();
|
|
|
24be4e6 |
{
|
|
|
24be4e6 |
(**name)(p1, p2, p3, p4);
|
|
|
24be4e6 |
}
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
+#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/zbook/code/ztrap.F cernlib-2006.dfsg.2/src/packlib/zbook/code/ztrap.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/zbook/code/ztrap.F 1996-03-08 12:01:13.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/zbook/code/ztrap.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -48,8 +48,10 @@
|
|
|
24be4e6 |
#if defined(CERNLIB_BESM6)
|
|
|
24be4e6 |
IZ(JZ+19) = LOCF(IUSER)
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
-#if defined(CERNLIB_UNIX)
|
|
|
24be4e6 |
+#if defined(CERNLIB_UNIX) && !defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
IZ(JZ+19) = LOCB(IUSER)
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
+ IZ(JZ+19) = JUMPAD(IUSER)
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
END
|
|
|
24be4e6 |
#endif
|
|
|
db20d4b |
diff -urNad cernlib-2006.dfsg.2~/src/packlib/zebra/test/brztest/btest2.F cernlib-2006.dfsg.2/src/packlib/zebra/test/brztest/btest2.F
|
|
|
db20d4b |
--- cernlib-2006.dfsg.2~/src/packlib/zebra/test/brztest/btest2.F 1997-09-02 15:16:16.000000000 +0000
|
|
|
db20d4b |
+++ cernlib-2006.dfsg.2/src/packlib/zebra/test/brztest/btest2.F 2007-12-14 21:41:27.000000000 +0000
|
|
|
24be4e6 |
@@ -29,6 +29,15 @@
|
|
|
24be4e6 |
********************************************************************************
|
|
|
24be4e6 |
*
|
|
|
24be4e6 |
COMMON/CRZT/IXSTOR,IXDIV,IFENCE(2),LEV,LEVIN,BLVECT(30000)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+* LP64 compatibility:
|
|
|
24be4e6 |
+* For 64-bit pointer systems put local variables referenced by LOCF
|
|
|
24be4e6 |
+* in a dummy named common block to keep addresses in the program region.
|
|
|
24be4e6 |
+* see also: packlib/ffread/test/main.F (H. Vogt)
|
|
|
24be4e6 |
+
|
|
|
24be4e6 |
+#if defined(CERNLIB_QMLXIA64)
|
|
|
24be4e6 |
+ COMMON /TEST64/LBANK
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
DIMENSION LQ(999),IQ(999),Q(999)
|
|
|
24be4e6 |
EQUIVALENCE (IQ(1),Q(1),LQ(9)),(LQ(1),LEV)
|
|
|
24be4e6 |
C
|