mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-07 17:49:15 +00:00
8387403: BUILD_LIBJAVA remove special warning settings
Reviewed-by: djelinski, naoto, jlu, lucy
This commit is contained in:
parent
223b80b6d6
commit
7be9cd9674
@ -57,8 +57,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
|
||||
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
java_props_md.c_CFLAGS := \
|
||||
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"', \
|
||||
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
|
||||
DISABLED_WARNINGS_clang_TimeZone_md.c := unused-variable, \
|
||||
JDK_LIBS := libjvm, \
|
||||
LIBS_linux := $(LIBDL), \
|
||||
LIBS_aix := $(LIBDL) $(LIBM), \
|
||||
|
||||
@ -41,22 +41,11 @@
|
||||
#include "TimeZone_md.h"
|
||||
#include "path_util.h"
|
||||
|
||||
#define fileopen fopen
|
||||
#define filegets fgets
|
||||
#define fileclose fclose
|
||||
|
||||
#if defined(__linux__) || defined(_ALLBSD_SOURCE)
|
||||
#if defined(__linux__) || defined(MACOSX)
|
||||
static const char *ZONEINFO_DIR = "/usr/share/zoneinfo";
|
||||
static const char *DEFAULT_ZONEINFO_FILE = "/etc/localtime";
|
||||
#else
|
||||
static const char *SYS_INIT_FILE = "/etc/default/init";
|
||||
static const char *ZONEINFO_DIR = "/usr/share/lib/zoneinfo";
|
||||
static const char *DEFAULT_ZONEINFO_FILE = "/usr/share/lib/zoneinfo/localtime";
|
||||
#endif /* defined(__linux__) || defined(_ALLBSD_SOURCE) */
|
||||
|
||||
static const char popularZones[][4] = {"UTC", "GMT"};
|
||||
|
||||
#if defined(__linux__) || defined(MACOSX)
|
||||
static char *isFileIdentical(char* buf, size_t size, char *pathname);
|
||||
|
||||
/*
|
||||
@ -121,7 +110,7 @@ getPathName(const char *dir, const char *name) {
|
||||
/*
|
||||
* Scans the specified directory and its subdirectories to find a
|
||||
* zoneinfo file which has the same content as /etc/localtime on Linux
|
||||
* or /usr/share/lib/zoneinfo/localtime on Solaris given in 'buf'.
|
||||
* given in 'buf'.
|
||||
* If file is symbolic link, then the contents it points to are in buf.
|
||||
* Returns a zone ID if found, otherwise, NULL is returned.
|
||||
*/
|
||||
@ -475,7 +464,7 @@ tzerr:
|
||||
return javatz;
|
||||
}
|
||||
|
||||
#endif /* defined(_AIX) */
|
||||
#endif /* defined(__linux__) || defined(MACOSX) || defined(_AIX) */
|
||||
|
||||
/*
|
||||
* findJavaTZ_md() maps platform time zone ID to Java time zone ID
|
||||
@ -542,7 +531,6 @@ char *
|
||||
getGMTOffsetID()
|
||||
{
|
||||
char buf[32];
|
||||
char offset[6];
|
||||
struct tm localtm;
|
||||
time_t clock = time(NULL);
|
||||
if (localtime_r(&clock, &localtm) == NULL) {
|
||||
@ -576,6 +564,7 @@ getGMTOffsetID()
|
||||
snprintf(buf, sizeof(buf), (const char *)"GMT%c%02.2d:%02.2d",
|
||||
gmt_off < 0 ? '-' : '+' , abs(gmt_off / 60), gmt_off % 60);
|
||||
#else
|
||||
char offset[6];
|
||||
if (strftime(offset, 6, "%z", &localtm) != 5) {
|
||||
return strdup("GMT");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user