381 } 382 383 /* tmp dir */ 384 sprops.tmp_dir = P_tmpdir; 385 #ifdef MACOSX 386 /* darwin has a per-user temp dir */ 387 static char tmp_path[PATH_MAX]; 388 int pathSize = confstr(_CS_DARWIN_USER_TEMP_DIR, tmp_path, PATH_MAX); 389 if (pathSize > 0 && pathSize <= PATH_MAX) { 390 sprops.tmp_dir = tmp_path; 391 } 392 #endif /* MACOSX */ 393 394 /* patches/service packs installed */ 395 sprops.patch_level = NULL; // leave it undefined 396 397 /* Java 2D/AWT properties */ 398 #ifdef MACOSX 399 // Always the same Toolkit on Mac OS X 400 sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit"; 401 402 // check if we're in a GUI login session and set java.awt.headless=true if not 403 sprops.awt_headless = isInAquaSession() ? NULL : "true"; 404 #else 405 sprops.awt_toolkit = "sun.awt.X11.XToolkit"; 406 #endif 407 408 #ifdef SI_ISALIST 409 /* supported instruction sets */ 410 { 411 char list[258]; 412 sysinfo(SI_ISALIST, list, sizeof(list)); 413 sprops.cpu_isalist = strdup(list); 414 } 415 #else 416 sprops.cpu_isalist = NULL; 417 #endif 418 419 /* endianness of platform */ 420 { 421 unsigned int endianTest = 0xff000000; 422 if (((char*)(&endianTest))[0] != 0) 423 sprops.cpu_endian = "big"; | 381 } 382 383 /* tmp dir */ 384 sprops.tmp_dir = P_tmpdir; 385 #ifdef MACOSX 386 /* darwin has a per-user temp dir */ 387 static char tmp_path[PATH_MAX]; 388 int pathSize = confstr(_CS_DARWIN_USER_TEMP_DIR, tmp_path, PATH_MAX); 389 if (pathSize > 0 && pathSize <= PATH_MAX) { 390 sprops.tmp_dir = tmp_path; 391 } 392 #endif /* MACOSX */ 393 394 /* patches/service packs installed */ 395 sprops.patch_level = NULL; // leave it undefined 396 397 /* Java 2D/AWT properties */ 398 #ifdef MACOSX 399 // Always the same Toolkit on Mac OS X 400 sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit"; 401 #else 402 sprops.awt_toolkit = "sun.awt.X11.XToolkit"; 403 #endif 404 405 #ifdef SI_ISALIST 406 /* supported instruction sets */ 407 { 408 char list[258]; 409 sysinfo(SI_ISALIST, list, sizeof(list)); 410 sprops.cpu_isalist = strdup(list); 411 } 412 #else 413 sprops.cpu_isalist = NULL; 414 #endif 415 416 /* endianness of platform */ 417 { 418 unsigned int endianTest = 0xff000000; 419 if (((char*)(&endianTest))[0] != 0) 420 sprops.cpu_endian = "big"; |