8037825: Fix warnings and enable "warnings as errors" in serviceability native libraries
Reviewed-by: alanb
This commit is contained in:
parent
f60c942caa
commit
966f3bc845
@ -49,7 +49,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
|||||||
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
|
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS), \
|
||||||
CFLAGS_windows := /Gy, \
|
CFLAGS_windows := /Gy, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
|
||||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||||
@ -79,7 +79,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
|
|||||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
|
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
|
||||||
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
|
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
|
||||||
-I$(JDK_TOPDIR)/src/share/transport/socket \
|
-I$(JDK_TOPDIR)/src/share/transport/socket \
|
||||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
|
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
|
||||||
@ -115,7 +115,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
|||||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
|
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
|
||||||
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
|
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
|
||||||
-I$(JDK_TOPDIR)/src/share/transport/shmem \
|
-I$(JDK_TOPDIR)/src/share/transport/shmem \
|
||||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
|
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
|
||||||
@ -144,7 +144,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
|
|||||||
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
|
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
|
||||||
-I$(JDK_TOPDIR)/src/share/transport/export \
|
-I$(JDK_TOPDIR)/src/share/transport/export \
|
||||||
-I$(JDK_TOPDIR)/src/share/back/export \
|
-I$(JDK_TOPDIR)/src/share/back/export \
|
||||||
-I$(JDK_TOPDIR)/src/share/npt \
|
-I$(JDK_TOPDIR)/src/share/npt \
|
||||||
@ -179,7 +179,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
|
|||||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
|
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||||
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
|
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -248,7 +248,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
|
|||||||
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
|
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
|
CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
|
||||||
CFLAGS_debug := -DJPLIS_LOGGING, \
|
CFLAGS_debug := -DJPLIS_LOGGING, \
|
||||||
CFLAGS_release := -DNO_JPLIS_LOGGING, \
|
CFLAGS_release := -DNO_JPLIS_LOGGING, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
|
||||||
@ -316,7 +316,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
|
|||||||
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
|
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
|
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS), \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
@ -364,7 +364,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
|
|||||||
SRC := $(BUILD_LIBHPROF_SRC), \
|
SRC := $(BUILD_LIBHPROF_SRC), \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
|
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||||
$(BUILD_LIBHPROF_CFLAGS), \
|
$(BUILD_LIBHPROF_CFLAGS), \
|
||||||
CFLAGS_debug := -DHPROF_LOGGING, \
|
CFLAGS_debug := -DHPROF_LOGGING, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
|
||||||
@ -392,7 +392,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
|
|||||||
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
|
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||||
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
|
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -419,7 +419,7 @@ ifndef OPENJDK
|
|||||||
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
|
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
|
||||||
LANG := C, \
|
LANG := C, \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||||
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
|
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
|
||||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjfr/mapfile-vers, \
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjfr/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
#define BASE_STRATUM_NAME "Java"
|
#define BASE_STRATUM_NAME "Java"
|
||||||
|
|
||||||
#define null NULL
|
#define null NULL
|
||||||
#define true JNI_TRUE
|
|
||||||
#define false JNI_FALSE
|
|
||||||
#define String char *
|
#define String char *
|
||||||
#define private static
|
#define private static
|
||||||
|
|
||||||
@ -147,7 +145,7 @@ private jboolean isValid(void);
|
|||||||
defaultStratumId = null;
|
defaultStratumId = null;
|
||||||
defaultStratumIndex = -1;
|
defaultStratumIndex = -1;
|
||||||
baseStratumIndex = -2; /* so as not to match -1 above */
|
baseStratumIndex = -2; /* so as not to match -1 above */
|
||||||
sourceMapIsValid = false;
|
sourceMapIsValid = JNI_FALSE;
|
||||||
|
|
||||||
if (getSourceDebugExtension(clazz, &sourceDebugExtension) ==
|
if (getSourceDebugExtension(clazz, &sourceDebugExtension) ==
|
||||||
JVMTI_ERROR_NONE) {
|
JVMTI_ERROR_NONE) {
|
||||||
@ -667,7 +665,7 @@ private jboolean isValid(void);
|
|||||||
jplsFilename = readLine();
|
jplsFilename = readLine();
|
||||||
defaultStratumId = readLine();
|
defaultStratumId = readLine();
|
||||||
createJavaStratum();
|
createJavaStratum();
|
||||||
while (true) {
|
while (1) {
|
||||||
if (sdeRead() != '*') {
|
if (sdeRead() != '*') {
|
||||||
syntax("expected '*'");
|
syntax("expected '*'");
|
||||||
}
|
}
|
||||||
@ -684,7 +682,7 @@ private jboolean isValid(void);
|
|||||||
case 'E':
|
case 'E':
|
||||||
/* set end points */
|
/* set end points */
|
||||||
storeStratum("*terminator*");
|
storeStratum("*terminator*");
|
||||||
sourceMapIsValid = true;
|
sourceMapIsValid = JNI_TRUE;
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
ignoreSection();
|
ignoreSection();
|
||||||
|
@ -1682,7 +1682,7 @@ HandlerNode *
|
|||||||
eventHandler_createPermanentInternal(EventIndex ei, HandlerFunction func)
|
eventHandler_createPermanentInternal(EventIndex ei, HandlerFunction func)
|
||||||
{
|
{
|
||||||
return createInternal(ei, func, NULL,
|
return createInternal(ei, func, NULL,
|
||||||
NULL, NULL, (jlocation)NULL, JNI_TRUE);
|
NULL, NULL, 0, JNI_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandlerNode *
|
HandlerNode *
|
||||||
@ -1691,7 +1691,7 @@ eventHandler_createInternalThreadOnly(EventIndex ei,
|
|||||||
jthread thread)
|
jthread thread)
|
||||||
{
|
{
|
||||||
return createInternal(ei, func, thread,
|
return createInternal(ei, func, thread,
|
||||||
NULL, NULL, (jlocation)NULL, JNI_FALSE);
|
NULL, NULL, 0, JNI_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandlerNode *
|
HandlerNode *
|
||||||
|
@ -56,17 +56,24 @@ static int open_count;
|
|||||||
static void
|
static void
|
||||||
get_time_stamp(char *tbuf, size_t ltbuf)
|
get_time_stamp(char *tbuf, size_t ltbuf)
|
||||||
{
|
{
|
||||||
char format[MAXLEN_TIMESTAMP+1];
|
char timestamp_prefix[MAXLEN_TIMESTAMP+1];
|
||||||
|
char timestamp_postfix[MAXLEN_TIMESTAMP+1];
|
||||||
unsigned millisecs = 0;
|
unsigned millisecs = 0;
|
||||||
time_t t = 0;
|
time_t t = 0;
|
||||||
|
|
||||||
GETMILLSECS(millisecs);
|
GETMILLSECS(millisecs);
|
||||||
if ( time(&t) == (time_t)(-1) )
|
if ( time(&t) == (time_t)(-1) ) {
|
||||||
t = 0;
|
t = 0;
|
||||||
(void)strftime(format, sizeof(format),
|
}
|
||||||
/* Break this string up for SCCS's sake */
|
/* Break this up so that the format strings are string literals
|
||||||
"%" "d.%" "m.%" "Y %" "T.%%.3d %" "Z", localtime(&t));
|
and we avoid a compiler warning. */
|
||||||
(void)snprintf(tbuf, ltbuf, format, (int)(millisecs));
|
(void)strftime(timestamp_prefix, sizeof(timestamp_prefix),
|
||||||
|
"%d.%m.%Y %T", localtime(&t));
|
||||||
|
(void)strftime(timestamp_postfix, sizeof(timestamp_postfix),
|
||||||
|
"%Z", localtime(&t));
|
||||||
|
(void)snprintf(tbuf, ltbuf,
|
||||||
|
"%s.%.3d %s", timestamp_prefix,
|
||||||
|
(int)(millisecs), timestamp_postfix);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get basename of filename */
|
/* Get basename of filename */
|
||||||
@ -175,7 +182,7 @@ log_message_end(const char *format, ...)
|
|||||||
"LOC=%s;PID=%d;THR=t@%d",
|
"LOC=%s;PID=%d;THR=t@%d",
|
||||||
location_stamp,
|
location_stamp,
|
||||||
(int)processPid,
|
(int)processPid,
|
||||||
(int)tid);
|
(int)(intptr_t)tid);
|
||||||
|
|
||||||
/* Construct message string. */
|
/* Construct message string. */
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
@ -359,7 +359,7 @@ Agent_OnAttach(JavaVM* vm, char *args, void * reserved) {
|
|||||||
* class name. The manifest is in UTF8 so need to convert to
|
* class name. The manifest is in UTF8 so need to convert to
|
||||||
* modified UTF8 (see JNI spec).
|
* modified UTF8 (see JNI spec).
|
||||||
*/
|
*/
|
||||||
oldLen = strlen(agentClass);
|
oldLen = (int)strlen(agentClass);
|
||||||
newLen = modifiedUtf8LengthOfUtf8(agentClass, oldLen);
|
newLen = modifiedUtf8LengthOfUtf8(agentClass, oldLen);
|
||||||
if (newLen == oldLen) {
|
if (newLen == oldLen) {
|
||||||
agentClass = strdup(agentClass);
|
agentClass = strdup(agentClass);
|
||||||
|
@ -46,9 +46,9 @@ static jlong H_PATH;
|
|||||||
|
|
||||||
/* Compute the low-order mask for the characters in the given string */
|
/* Compute the low-order mask for the characters in the given string */
|
||||||
static jlong lowMask(char* s) {
|
static jlong lowMask(char* s) {
|
||||||
int n = strlen(s);
|
size_t n = strlen(s);
|
||||||
jlong m = 0;
|
jlong m = 0;
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
int c = (int)s[i];
|
int c = (int)s[i];
|
||||||
if (c < 64)
|
if (c < 64)
|
||||||
@ -59,9 +59,9 @@ static jlong lowMask(char* s) {
|
|||||||
|
|
||||||
/* Compute the high-order mask for the characters in the given string */
|
/* Compute the high-order mask for the characters in the given string */
|
||||||
static jlong highMask(char* s) {
|
static jlong highMask(char* s) {
|
||||||
int n = strlen(s);
|
size_t n = strlen(s);
|
||||||
jlong m = 0;
|
jlong m = 0;
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
int c = (int)s[i];
|
int c = (int)s[i];
|
||||||
if ((c >= 64) && (c < 128))
|
if ((c >= 64) && (c < 128))
|
||||||
@ -168,7 +168,7 @@ static void initialize() {
|
|||||||
* illegal characters. Returns 0 if only validate characters are present.
|
* illegal characters. Returns 0 if only validate characters are present.
|
||||||
*/
|
*/
|
||||||
int validatePathChars(const char* path) {
|
int validatePathChars(const char* path) {
|
||||||
int i, n;
|
size_t i, n;
|
||||||
|
|
||||||
/* initialize on first usage */
|
/* initialize on first usage */
|
||||||
if (L_HEX == 0) {
|
if (L_HEX == 0) {
|
||||||
|
@ -62,13 +62,13 @@ typedef unsigned long UNSIGNED_JINT;
|
|||||||
(((UNSIGNED_JINT)(x & 0xff000000)) >> 24))
|
(((UNSIGNED_JINT)(x & 0xff000000)) >> 24))
|
||||||
#define HOST_TO_JAVA_LONG(x) \
|
#define HOST_TO_JAVA_LONG(x) \
|
||||||
((x << 56) | \
|
((x << 56) | \
|
||||||
((x & 0x000000000000ff00) << 40) | \
|
((x & 0x000000000000ff00LL) << 40) | \
|
||||||
((x & 0x0000000000ff0000) << 24) | \
|
((x & 0x0000000000ff0000LL) << 24) | \
|
||||||
((x & 0x00000000ff000000) << 8) | \
|
((x & 0x00000000ff000000LL) << 8) | \
|
||||||
((x & 0x000000ff00000000) >> 8) | \
|
((x & 0x000000ff00000000LL) >> 8) | \
|
||||||
((x & 0x0000ff0000000000) >> 24) | \
|
((x & 0x0000ff0000000000LL) >> 24) | \
|
||||||
((x & 0x00ff000000000000) >> 40) | \
|
((x & 0x00ff000000000000LL) >> 40) | \
|
||||||
(((UNSIGNED_JLONG)(x & 0xff00000000000000)) >> 56))
|
(((UNSIGNED_JLONG)(x & 0xff00000000000000ULL)) >> 56))
|
||||||
#define HOST_TO_JAVA_FLOAT(x) stream_encodeFloat(x)
|
#define HOST_TO_JAVA_FLOAT(x) stream_encodeFloat(x)
|
||||||
#define HOST_TO_JAVA_DOUBLE(x) stream_encodeDouble(x)
|
#define HOST_TO_JAVA_DOUBLE(x) stream_encodeDouble(x)
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#include <mach/task_info.h>
|
#include <mach/task_info.h>
|
||||||
|
|
||||||
|
#include "jvm.h"
|
||||||
|
|
||||||
JNIEXPORT jdouble JNICALL
|
JNIEXPORT jdouble JNICALL
|
||||||
Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
|
Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
#define MUTEX_T int
|
#define MUTEX_T int
|
||||||
#define MUTEX_INIT 0
|
#define MUTEX_INIT 0
|
||||||
@ -40,4 +41,4 @@
|
|||||||
|
|
||||||
#define popen _popen
|
#define popen _popen
|
||||||
#define pclose _pclose
|
#define pclose _pclose
|
||||||
#define sleep _sleep
|
#define sleep(s) Sleep((s)*1000)
|
||||||
|
Loading…
Reference in New Issue
Block a user