| 1 |
--- mshmet.2011.03.06/sources/mshmet.h 2011-02-11 19:41:49.000000000 +0100 |
| 2 |
+++ mshmet.2011.03.06/sourceslib/mshmet.h 2011-11-16 22:04:20.000000000 +0100 |
| 3 |
@@ -33,7 +33,7 @@ |
| 4 |
#define MS_MAX(a,b) ( ((a) < (b)) ? (b) : (a) ) |
| 5 |
#define MS_MIN(a,b) ( ((a) < (b)) ? (a) : (b) ) |
| 6 |
|
| 7 |
-char idir[5]; |
| 8 |
+extern char idir[5]; |
| 9 |
|
| 10 |
typedef struct { |
| 11 |
double c[3]; |
| 12 |
@@ -135,17 +135,17 @@ |
| 13 |
pHash hashEdge_3d(pMesh mesh); |
| 14 |
pHash hashEdge_2d(pMesh mesh); |
| 15 |
|
| 16 |
-int (*boulep)(pMesh ,int ,int ,int *); |
| 17 |
-int (*hashel)(pMesh ); |
| 18 |
-int (*gradLS)(pMesh ,pSol ,int ,int ); |
| 19 |
-int (*hessLS)(pMesh ,pSol ,int ,int ); |
| 20 |
-int (*avgval)(pMesh ,pSol ,int ); |
| 21 |
-int (*clsval)(pMesh ,pSol ,int ); |
| 22 |
-int (*nrmhes)(pMesh ,pSol ,int ); |
| 23 |
-int (*redsim)(double *,double *,double *); |
| 24 |
-int (*defmet)(pMesh ,pSol ,int ); |
| 25 |
-double (*getSol)(pSol ,int ,int ); |
| 26 |
-int (*metrLS)(pMesh mesh,pSol ); |
| 27 |
-int (*lissag)(pMesh ,pSol , int ,int ); |
| 28 |
+extern int (*boulep)(pMesh ,int ,int ,int *); |
| 29 |
+extern int (*hashel)(pMesh ); |
| 30 |
+extern int (*gradLS)(pMesh ,pSol ,int ,int ); |
| 31 |
+extern int (*hessLS)(pMesh ,pSol ,int ,int ); |
| 32 |
+extern int (*avgval)(pMesh ,pSol ,int ); |
| 33 |
+extern int (*clsval)(pMesh ,pSol ,int ); |
| 34 |
+extern int (*nrmhes)(pMesh ,pSol ,int ); |
| 35 |
+extern int (*redsim)(double *,double *,double *); |
| 36 |
+extern int (*defmet)(pMesh ,pSol ,int ); |
| 37 |
+extern double (*getSol)(pSol ,int ,int ); |
| 38 |
+extern int (*metrLS)(pMesh mesh,pSol ); |
| 39 |
+extern int (*lissag)(pMesh ,pSol , int ,int ); |
| 40 |
|
| 41 |
#endif |
| 42 |
--- mshmet.2012.04.25/sources/lplib3.c 2013-04-10 11:53:17.000000000 +0200 |
| 43 |
+++ mshmet.2012.04.25/sourceslib/lplib3.c 2013-04-10 11:54:49.000000000 +0200 |
| 44 |
@@ -30,7 +30,10 @@ |
| 45 |
#include <assert.h> |
| 46 |
#include <errno.h> |
| 47 |
#include "lplib3.h" |
| 48 |
- |
| 49 |
+#ifdef __FreeBSD__ |
| 50 |
+#include <sys/types.h> |
| 51 |
+#include <pmc.h> |
| 52 |
+#endif |
| 53 |
|
| 54 |
/*----------------------------------------------------------*/ |
| 55 |
/* Defines */ |
| 56 |
@@ -1250,6 +1253,7 @@ |
| 57 |
* NPROC environment variable (BSD/OS, CrayOS) |
| 58 |
* sysctl hw.ncpu or kern.smp.cpus |
| 59 |
*/ |
| 60 |
+ int ncpu; |
| 61 |
if (pmc_init() == 0 && (ncpu = pmc_ncpu()) != -1) |
| 62 |
maxthreads = ncpu; |
| 63 |
else |