1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
$NetBSD: patch-de,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
--- lpsolve/lp_solve_5.5.patch.orig 2008-06-16 23:19:46.000000000 +0900
+++ lpsolve/lp_solve_5.5.patch 2008-06-27 18:23:09.000000000 +0900
@@ -1,12 +1,33 @@
---- misc/lp_solve_5.5/lpsolve55/ccc Sat Jun 11 21:27:18 2005
-+++ misc/build/lp_solve_5.5/lpsolve55/ccc Wed May 21 17:19:56 2008
-@@ -1,5 +1,5 @@
+--- misc/lp_solve_5.5/lpsolve55/ccc 2005-06-12 04:27:18.000000000 +0900
++++ misc/build/lp_solve_5.5/lpsolve55/ccc 2008-06-27 18:21:52.000000000 +0900
+@@ -1,12 +1,16 @@
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
+c=$CC
def=
so=
+ if [ "$PLATFORM" = "SCO_UNIX" ]
+ then def='-dy -K PIC -DNOLONGLONG'
+ dl=-lc
+-else dl=-ldl
++else
++ if [ x"$OS" = x"NETBSD" -o x"$OS" = x"FREEBSD" ]
++ then dl=-lc
++ else dl=-ldl
++ fi
+ so=y
+ fi
+
+@@ -19,7 +23,7 @@
+ if [ "$so" != "" ]
+ then
+ $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
++ $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm $dl
+ fi
+
+ rm *.o 2>/dev/null
--- misc/lp_solve_5.5/lpsolve55/ccc.osx Thu Jun 23 22:53:08 2005
+++ misc/build/lp_solve_5.5/lpsolve55/ccc.osx Wed May 21 17:19:56 2008
@@ -3,6 +3,10 @@
@@ -72,3 +93,53 @@
+fi
+
+rm *.o 2>/dev/null
+--- misc/lp_solve_5.5/shared/commonlib.c 2007-01-15 03:33:14.000000000 +0900
++++ misc/build/lp_solve_5.5/shared/commonlib.c 2008-06-27 18:16:17.000000000 +0900
+@@ -4,7 +4,7 @@
+ #ifdef INTEGERTIME
+ # include <time.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -700,10 +700,10 @@
+ #elif defined CLOCKTIME
+ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf, NULL);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+
+--- misc/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2007-01-15 03:29:20.000000000 +0900
++++ misc/build/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2008-06-27 18:17:35.000000000 +0900
+@@ -4,7 +4,7 @@
+ #ifdef INTEGERTIME
+ # include <time.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -673,10 +673,10 @@
+ #elif defined CLOCKTIME
+ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+
|