Mercurial > hg > graal-compiler
comparison src/os/linux/vm/os_linux.cpp @ 4082:36b057451829
7110017: is_headless_jre should be updated to reflect the new location of awt toolkit libraries
Reviewed-by: dholmes, dsamersoff
Contributed-by: Chris Hegarty <chris.hegarty@oracle.com>
author | dholmes |
---|---|
date | Wed, 16 Nov 2011 20:38:24 -0500 |
parents | 436b4a3231bf |
children | 04b9a2566eec e7dead7e90af |
comparison
equal
deleted
inserted
replaced
4067:f9a80a035a4a | 4082:36b057451829 |
---|---|
5423 } | 5423 } |
5424 } | 5424 } |
5425 | 5425 |
5426 // is_headless_jre() | 5426 // is_headless_jre() |
5427 // | 5427 // |
5428 // Test for the existence of libmawt in motif21 or xawt directories | 5428 // Test for the existence of xawt/libmawt.so or libawt_xawt.so |
5429 // in order to report if we are running in a headless jre | 5429 // in order to report if we are running in a headless jre |
5430 // | |
5431 // Since JDK8 xawt/libmawt.so was moved into the same directory | |
5432 // as libawt.so, and renamed libawt_xawt.so | |
5430 // | 5433 // |
5431 bool os::is_headless_jre() { | 5434 bool os::is_headless_jre() { |
5432 struct stat statbuf; | 5435 struct stat statbuf; |
5433 char buf[MAXPATHLEN]; | 5436 char buf[MAXPATHLEN]; |
5434 char libmawtpath[MAXPATHLEN]; | 5437 char libmawtpath[MAXPATHLEN]; |
5435 const char *xawtstr = "/xawt/libmawt.so"; | 5438 const char *xawtstr = "/xawt/libmawt.so"; |
5436 const char *motifstr = "/motif21/libmawt.so"; | 5439 const char *new_xawtstr = "/libawt_xawt.so"; |
5437 char *p; | 5440 char *p; |
5438 | 5441 |
5439 // Get path to libjvm.so | 5442 // Get path to libjvm.so |
5440 os::jvm_path(buf, sizeof(buf)); | 5443 os::jvm_path(buf, sizeof(buf)); |
5441 | 5444 |
5452 // check xawt/libmawt.so | 5455 // check xawt/libmawt.so |
5453 strcpy(libmawtpath, buf); | 5456 strcpy(libmawtpath, buf); |
5454 strcat(libmawtpath, xawtstr); | 5457 strcat(libmawtpath, xawtstr); |
5455 if (::stat(libmawtpath, &statbuf) == 0) return false; | 5458 if (::stat(libmawtpath, &statbuf) == 0) return false; |
5456 | 5459 |
5457 // check motif21/libmawt.so | 5460 // check libawt_xawt.so |
5458 strcpy(libmawtpath, buf); | 5461 strcpy(libmawtpath, buf); |
5459 strcat(libmawtpath, motifstr); | 5462 strcat(libmawtpath, new_xawtstr); |
5460 if (::stat(libmawtpath, &statbuf) == 0) return false; | 5463 if (::stat(libmawtpath, &statbuf) == 0) return false; |
5461 | 5464 |
5462 return true; | 5465 return true; |
5463 } | 5466 } |
5464 | 5467 |