ObjFW  Check-in [a3dcdac0b8]

Overview
Comment:Only use _SC_* if defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a3dcdac0b87b965e6fb3f6af4717b8110a30bda04929bdfd9bde8e23ed97d062
User & Date: js on 2012-07-11 08:38:31
Other Links: manifest | tags
Context
2012-07-11
09:01
Remove old defines from objfw-defs.h.in. check-in: 15262133cf user: js tags: trunk
08:38
Only use _SC_* if defined. check-in: a3dcdac0b8 user: js tags: trunk
08:30
exception.m: Fix a missing free. check-in: cc68082389 user: js tags: trunk
Changes

Modified src/OFObject.m from [a5886ec856] to [fd16b773e1].

213
214
215
216
217
218
219
220
221
222
223

224

225

226

227
228
229
230
231
232
233
	}

#if defined(_WIN32)
	SYSTEM_INFO si;
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;
	of_num_cpus = si.dwNumberOfProcessors;
#elif defined(_PSP)
	of_pagesize = 4096;
	of_num_cpus = 1;
#else

	if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)

		of_pagesize = 4096;

	if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)

		of_num_cpus = 1;
#endif
}

+ (void)initialize
{
}







<
<
<

>

>

>

>







213
214
215
216
217
218
219



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
	}

#if defined(_WIN32)
	SYSTEM_INFO si;
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;
	of_num_cpus = si.dwNumberOfProcessors;



#else
# ifdef _SC_PAGESIZE
	if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
# endif
		of_pagesize = 4096;
# ifdef _SC_NPROCESSORS_CONF
	if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
# endif
		of_num_cpus = 1;
#endif
}

+ (void)initialize
{
}