Line 0
Link Here
|
|
|
1 |
--- src/taucs_memory.c.orig 2003-09-01 06:16:13 UTC |
2 |
+++ src/taucs_memory.c |
3 |
@@ -123,7 +123,6 @@ double taucs_system_memory_size() |
4 |
} |
5 |
#endif |
6 |
|
7 |
-#ifdef OSTYPE_darwin |
8 |
#define TAUCS_SYSTEM_MEMORY_SIZE_DEFINED |
9 |
|
10 |
/* This is a BSD4.4 interface, so it should work on other BSD systems */ |
11 |
@@ -134,7 +133,7 @@ double taucs_system_memory_size() |
12 |
double taucs_system_memory_size() |
13 |
{ |
14 |
int mib[2] = { CTL_HW, HW_PHYSMEM }; |
15 |
- int int_retval; |
16 |
+ unsigned long int_retval; |
17 |
size_t len = sizeof(int); |
18 |
|
19 |
taucs_printf("taucs_system_memory_size: calling sysctl\n"); |
20 |
@@ -142,7 +141,7 @@ double taucs_system_memory_size() |
21 |
if ( sysctl(mib,2, |
22 |
&int_retval,&len, |
23 |
NULL, 0)) { |
24 |
- taucs_printf("taucs_system_memory_size: ERROR, sysctl failed (on darwin)\n"); |
25 |
+ taucs_printf("taucs_system_memory_size: ERROR, HW_PAGESIZE sysctl failed (on bsd)\n"); |
26 |
return -1.0; |
27 |
} |
28 |
taucs_printf(" sysctl pagesize %d bytes\n",int_retval); |
29 |
@@ -151,14 +150,13 @@ double taucs_system_memory_size() |
30 |
if ( sysctl(mib,2, |
31 |
&int_retval,&len, |
32 |
NULL, 0)) { |
33 |
- taucs_printf("taucs_system_memory_size: ERROR, sysctl failed (on darwin)\n"); |
34 |
+ taucs_printf("taucs_system_memory_size: ERROR, HW_PHYSMEM sysctl failed (on bsd)\n"); |
35 |
return -1.0; |
36 |
} |
37 |
taucs_printf(" sysctl physmem %d bytes\n",int_retval); |
38 |
|
39 |
return (double) int_retval; |
40 |
} |
41 |
-#endif |
42 |
|
43 |
#ifdef OSTYPE_aix |
44 |
#define TAUCS_SYSTEM_MEMORY_SIZE_DEFINED |