]> www.ginac.de Git - cln.git/blob - lidia-interface/LiDIA-patch1
some minor fixes with respect to RPM package building
[cln.git] / lidia-interface / LiDIA-patch1
1 diff -r -c3 LiDIA-1.3.orig/Readme LiDIA-1.3/Readme
2 *** LiDIA-1.3.orig/Readme       Wed Feb  5 21:51:10 1997
3 --- LiDIA-1.3/Readme    Sun Jan 25 00:44:29 1998
4 ***************
5 *** 157,164 ****
6   o mpqs: large prime variant for quadratic sieve in the class
7     rational_factorization.
8   
9 ! o You can now choose gmp as the integer arithmetic of the kernel.
10 !   This LiDIA - release contains gmp version 2.0.2.
11   
12   
13   
14 --- 157,164 ----
15   o mpqs: large prime variant for quadratic sieve in the class
16     rational_factorization.
17   
18 ! o You can now choose gmp or cln as the integer arithmetic of the kernel.
19 !   This LiDIA release contains gmp version 2.0.2 and cln version 1997-09-06.
20   
21   
22   
23 diff -r -c3 LiDIA-1.3.orig/config/CONFIG.in LiDIA-1.3/config/CONFIG.in
24 *** LiDIA-1.3.orig/config/CONFIG.in     Wed Feb  5 12:02:16 1997
25 --- LiDIA-1.3/config/CONFIG.in  Sat Jan 24 18:42:57 1998
26 ***************
27 *** 42,48 ****
28   #
29   # The Kernel And The Interface To Be compiled
30   #
31 ! # Possible Integer Interfaces Are: libI, lip, gmp
32   #
33   # Possible Memory Managers Are: malloc, dentzer, boehm,
34   #                               default (no manager)
35 --- 42,48 ----
36   #
37   # The Kernel And The Interface To Be compiled
38   #
39 ! # Possible Integer Interfaces Are: libI, lip, gmp, cln
40   #
41   # Possible Memory Managers Are: malloc, dentzer, boehm,
42   #                               default (no manager)
43 ***************
44 *** 149,155 ****
45    LIDIA_INSTALL_DAT    = ${LIDIA_INSTALL_DIR}/lib
46    
47   #
48 ! # OS/2 Compatability Section 
49   #
50    
51                 CXX-off =
52 --- 149,155 ----
53    LIDIA_INSTALL_DAT    = ${LIDIA_INSTALL_DIR}/lib
54    
55   #
56 ! # OS/2 Compatibility Section 
57   #
58    
59                 CXX-off =
60 ***************
61 *** 166,171 ****
62 --- 166,172 ----
63   # Make Command Macros
64   #
65   # AR       -- the archiver command
66 + # ARX      -- the archiver extract command
67   # RM       -- command used to remove files
68   # RMR      -- command used to remove directories
69   # CP       -- command used to copy files
70 ***************
71 *** 178,183 ****
72 --- 179,185 ----
73   #
74   
75                   AR    = @AR@ 
76 +                 ARX   = ar x
77                   RM    = @RM@
78                   RMR   = @RMR@
79                   CP    = @CP@
80 diff -r -c3 LiDIA-1.3.orig/config/CONFIG.os2 LiDIA-1.3/config/CONFIG.os2
81 *** LiDIA-1.3.orig/config/CONFIG.os2    Tue Jan 21 14:55:44 1997
82 --- LiDIA-1.3/config/CONFIG.os2 Sat Jan 24 18:43:28 1998
83 ***************
84 *** 137,142 ****
85 --- 137,143 ----
86   # Make Command Macros
87   #
88   # AR       -- the archiver command
89 + # ARX      -- the archiver extract command
90   # RM       -- command used to remove files
91   # RMR      -- command used to remove directories
92   # CP       -- command used to copy files
93 ***************
94 *** 147,152 ****
95 --- 148,154 ----
96   # TOUCH    -- command used to create an empry file
97   #
98                 AR    = ar ru
99 +               ARX   = ar x
100                 RM    = del /N
101                 RMR   = del /N
102                 CP    = xcopy
103 diff -r -c3 LiDIA-1.3.orig/config/bin/integer-sh LiDIA-1.3/config/bin/integer-sh
104 *** LiDIA-1.3.orig/config/bin/integer-sh        Tue Oct 22 22:25:57 1996
105 --- LiDIA-1.3/config/bin/integer-sh     Sun Jan 25 00:47:13 1998
106 ***************
107 *** 7,15 ****
108   
109   echo " "
110   echo "You will now be asked for the integer arithmetic that " 
111 ! echo "will be used in the kernel of LiDIA (gmp, libI, lip)."
112   echo " "
113   echo "gmp   - written by Torbjorn Granlund"
114   echo "libI  - written by Ralf Dentzer"
115   echo "lip   - written by Arjen Lenstra"
116   echo " "
117 --- 7,16 ----
118   
119   echo " "
120   echo "You will now be asked for the integer arithmetic that " 
121 ! echo "will be used in the kernel of LiDIA (gmp, cln, libI, lip)."
122   echo " "
123   echo "gmp   - written by Torbjorn Granlund"
124 + echo "cln   - written by Bruno Haible (based on gmp)"
125   echo "libI  - written by Ralf Dentzer"
126   echo "lip   - written by Arjen Lenstra"
127   echo " "
128 ***************
129 *** 23,35 ****
130   do 
131     echo -n "integer arithmetic ? [$INTEGERS] : "
132     read ANSWER
133 !   if test "$ANSWER" = "gmp" -o "$ANSWER" = "lip" -o "$ANSWER" = "libI" ; then
134       INTEGERS=$ANSWER
135       SUCCESS=y
136     elif test "$ANSWER" = "" ; then
137       SUCCESS=y
138     else
139 !     echo "Please choose gmp, libI, or lip." 
140       INTEGERS="libI"
141     fi
142   done
143 --- 24,36 ----
144   do 
145     echo -n "integer arithmetic ? [$INTEGERS] : "
146     read ANSWER
147 !   if test "$ANSWER" = "gmp" -o "$ANSWER" = "cln" -o "$ANSWER" = "lip" -o "$ANSWER" = "libI" ; then
148       INTEGERS=$ANSWER
149       SUCCESS=y
150     elif test "$ANSWER" = "" ; then
151       SUCCESS=y
152     else
153 !     echo "Please choose gmp, cln, libI, or lip." 
154       INTEGERS="libI"
155     fi
156   done
157 diff -r -c3 LiDIA-1.3.orig/doc/manual/FIG/lidia_model.fig LiDIA-1.3/doc/manual/FIG/lidia_model.fig
158 *** LiDIA-1.3.orig/doc/manual/FIG/lidia_model.fig       Tue Feb 27 11:57:01 1996
159 --- LiDIA-1.3/doc/manual/FIG/lidia_model.fig    Sun Jan 25 00:48:58 1998
160 ***************
161 *** 55,61 ****
162   4 0 -1 0 0 2 16 0.0000000 4 225 2085 1200 2850 parameterized classes\001
163   4 0 -1 0 0 2 16 0.0000000 4 225 1365 1200 4035 simple classes\001
164   4 0 -1 0 0 2 16 0.0000000 4 165 930 1200 5220 interfaces\001
165 ! 4 2 -1 0 0 12 12 0.0000000 4 180 2100 9000 6375 (libI, lip, gmp, mm)\001
166   4 2 -1 0 0 12 12 0.0000000 4 180 1365 9000 5175 (bigint, gmm)\001
167   4 2 -1 0 0 12 12 0.0000000 4 180 2940 9000 3975 (bigrational, bigfloat, ...)\001
168   4 2 -1 0 0 12 12 0.0000000 4 180 3675 9000 2775 (vector, matrix, power series, ...)\001
169 --- 55,61 ----
170   4 0 -1 0 0 2 16 0.0000000 4 225 2085 1200 2850 parameterized classes\001
171   4 0 -1 0 0 2 16 0.0000000 4 225 1365 1200 4035 simple classes\001
172   4 0 -1 0 0 2 16 0.0000000 4 165 930 1200 5220 interfaces\001
173 ! 4 2 -1 0 0 12 12 0.0000000 4 180 2100 9000 6375 (libI, lip, gmp, cln, mm)\001
174   4 2 -1 0 0 12 12 0.0000000 4 180 1365 9000 5175 (bigint, gmm)\001
175   4 2 -1 0 0 12 12 0.0000000 4 180 2940 9000 3975 (bigrational, bigfloat, ...)\001
176   4 2 -1 0 0 12 12 0.0000000 4 180 3675 9000 2775 (vector, matrix, power series, ...)\001
177 diff -r -c3 LiDIA-1.3.orig/doc/manual/bibliography.tex LiDIA-1.3/doc/manual/bibliography.tex
178 *** LiDIA-1.3.orig/doc/manual/bibliography.tex  Fri Jan 24 13:22:31 1997
179 --- LiDIA-1.3/doc/manual/bibliography.tex       Sun Jan 25 00:55:48 1998
180 ***************
181 *** 151,156 ****
182 --- 151,159 ----
183   \IT{A rigorous subexponential algorithm for computation of class groups},
184   Tech. report, IBM Research Report, San Jose, CA, 1989.
185   
186 + \bibitem{haible} B. Haible:
187 + \IT{CLN, a Class Library for Numbers}, 1997.
188
189   \bibitem{HLConF} G.H. Hardy and J.E. Littlewood:
190   \IT{\em Partitio numerorum {III}: On the expression of a number as a sum of
191   primes}, Acta Math. {\bf 44} (1923), 1--70.
192 diff -r -c3 LiDIA-1.3.orig/doc/manual/installing.tex LiDIA-1.3/doc/manual/installing.tex
193 *** LiDIA-1.3.orig/doc/manual/installing.tex    Wed Feb  5 17:33:40 1997
194 --- LiDIA-1.3/doc/manual/installing.tex Sun Jan 25 00:58:30 1998
195 ***************
196 *** 309,316 ****
197   of the kernel.
198   \item BIGINT\\
199   This is used to decide which integer arithmetic is to be compiled with
200 ! {\LiDIA}. At the moment we support three possibilities: \TT{gmp}, \TT{libI},
201 ! and \TT{lip}. We suggest that you use the \TT{gmp} with the GNU g++
202   compiler and \TT{libI} otherwise. Use \TT{lip}, if you have chosen
203   \TT{libI} during the configuration process and TARGET has been set
204   to c by configure. In this case, no \TT{libI} assembler code is
205 --- 309,316 ----
206   of the kernel.
207   \item BIGINT\\
208   This is used to decide which integer arithmetic is to be compiled with
209 ! {\LiDIA}. At the moment we support four possibilities: \TT{gmp}, \TT{cln},
210 ! TT{libI}, and \TT{lip}. We suggest that you use the \TT{gmp} with the GNU g++
211   compiler and \TT{libI} otherwise. Use \TT{lip}, if you have chosen
212   \TT{libI} during the configuration process and TARGET has been set
213   to c by configure. In this case, no \TT{libI} assembler code is
214 diff -r -c3 LiDIA-1.3.orig/doc/manual/overview.tex LiDIA-1.3/doc/manual/overview.tex
215 *** LiDIA-1.3.orig/doc/manual/overview.tex      Wed Jan 29 19:32:32 1997
216 --- LiDIA-1.3/doc/manual/overview.tex   Sun Jan 25 00:57:36 1998
217 ***************
218 *** 19,24 ****
219 --- 19,25 ----
220   \newcommand{\libi}{{\bf libI}}
221   \newcommand{\gmp}{{\bf GNU gmp}}
222   \newcommand{\lip}{{\bf lip}}
223 + \newcommand{\cln}{{\bf cln}}
224   \newcommand{\bigint}{{\bf bigint}}
225   
226   
227 ***************
228 *** 70,76 ****
229   It is a serious problem to decide which multiprecision integer package
230   and which memory manager should be used in \LiDIA. There are
231   competing multiprecision integer packages, for example the
232 ! \gmp\ package  \cite{gnump}, the \libi\ package \cite{dentzer} and
233   the \lip\ package \cite{lenstra}. Some of those packages are more
234   efficient on one architecture and some on others. Also, new
235   architectures lead very fast to new multiprecision packages. We decided
236 --- 71,78 ----
237   It is a serious problem to decide which multiprecision integer package
238   and which memory manager should be used in \LiDIA. There are
239   competing multiprecision integer packages, for example the
240 ! \gmp\ package  \cite{gnump}, the \cln\ package \cite{haible},
241 ! the \libi\ package \cite{dentzer} and
242   the \lip\ package \cite{lenstra}. Some of those packages are more
243   efficient on one architecture and some on others. Also, new
244   architectures lead very fast to new multiprecision packages. We decided
245 ***************
246 *** 112,120 ****
247   whole functionality of the interface can be used in the kernel.
248   Currently, we support the multiprecision integer packages
249   \libi\ \cite{dentzer}, Arjen Lenstra's \Index{lip} package \cite{lenstra}
250 ! (available by anonymous ftp via \TT{flash.bellcore.com:/pub/lenstra}) and GNU's
251   \IndexSUBTT{GNU}{gmp} arithmetic \cite{gnump} (available by anonymous
252 ! ftp via \TT{prep.ai.mit.edu}).
253   
254   The second \LiDIA\  level is the \BF{interface} through which {\CPP}
255   applications on higher levels have access to the kernel. By that
256 --- 114,123 ----
257   whole functionality of the interface can be used in the kernel.
258   Currently, we support the multiprecision integer packages
259   \libi\ \cite{dentzer}, Arjen Lenstra's \Index{lip} package \cite{lenstra}
260 ! (available by anonymous ftp via \TT{flash.bellcore.com:/pub/lenstra}), GNU's
261   \IndexSUBTT{GNU}{gmp} arithmetic \cite{gnump} (available by anonymous
262 ! ftp via \TT{prep.ai.mit.edu}), and CLN (available by anonymous ftp from
263 ! \TT{ma2s2.mathematik.uni-karlsruhe.de:/pub/gnu}).
264   
265   The second \LiDIA\  level is the \BF{interface} through which {\CPP}
266   applications on higher levels have access to the kernel. By that
267 diff -r -c3 LiDIA-1.3.orig/include/LiDIA/bigint.h LiDIA-1.3/include/LiDIA/bigint.h
268 *** LiDIA-1.3.orig/include/LiDIA/bigint.h       Tue Oct 29 17:47:17 1996
269 --- LiDIA-1.3/include/LiDIA/bigint.h    Sat Jan 24 20:29:16 1998
270 ***************
271 *** 51,56 ****
272 --- 51,57 ----
273               bigint(long l);
274               bigint(unsigned long ul);
275               bigint(const bigint & a);
276 +             bigint(const integer_type_name & II) : I (II) {} // cln needs this
277              ~bigint();
278   
279     /**
280 Only in LiDIA-1.3/src/interfaces/integers: cln
281 diff -r -c3 LiDIA-1.3.orig/src/interfaces/integers/gmp/bigint.c LiDIA-1.3/src/interfaces/integers/gmp/bigint.c
282 *** LiDIA-1.3.orig/src/interfaces/integers/gmp/bigint.c Fri Jan 10 18:19:00 1997
283 --- LiDIA-1.3/src/interfaces/integers/gmp/bigint.c      Sat Jan 24 17:41:29 1998
284 ***************
285 *** 610,616 ****
286   
287   void invert(bigint & a, const bigint & b)
288   {
289 !   if ((a.I._mp_size == 1 || a.I._mp_size == -1) && a.I._mp_d[0] == 1)
290       mpz_set(&a.I, &b.I);
291     else
292       lidia_error_handler("bigint", "invert::inverting of a non-unit.");
293 --- 610,616 ----
294   
295   void invert(bigint & a, const bigint & b)
296   {
297 !   if ((b.I._mp_size == 1 || b.I._mp_size == -1) && b.I._mp_d[0] == 1)
298       mpz_set(&a.I, &b.I);
299     else
300       lidia_error_handler("bigint", "invert::inverting of a non-unit.");
301 Only in LiDIA-1.3/src/kernel/integers: cln
302 diff -r -c3 LiDIA-1.3.orig/src/simple_classes/factorization/mpqs.c LiDIA-1.3/src/simple_classes/factorization/mpqs.c
303 *** LiDIA-1.3.orig/src/simple_classes/factorization/mpqs.c      Tue Jan 28 14:00:36 1997
304 --- LiDIA-1.3/src/simple_classes/factorization/mpqs.c   Sat Jan 24 17:45:17 1998
305 ***************
306 *** 17,23 ****
307   //extern "C" int system(char*);
308   #endif
309   
310 ! #if !defined(__GNUG__)
311   #include <signal.h>
312   #else
313   #define SIGHUP  1       /* hangup */
314 --- 17,23 ----
315   //extern "C" int system(char*);
316   #endif
317   
318 ! #if defined(__linux__) || !defined(__GNUG__)
319   #include <signal.h>
320   #else
321   #define SIGHUP  1       /* hangup */