8211360: Change #if DEF to #if defined(DEF)
Reviewed-by: bpb, vtewari
This commit is contained in:
parent
5c3896ce21
commit
5c25e2a6fb
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -41,9 +41,9 @@
|
||||
#if !defined(SO_REUSEPORT)
|
||||
#ifdef _WIN32
|
||||
#define SO_REUSEPORT 0
|
||||
#elif __linux__
|
||||
#elif defined(__linux__)
|
||||
#define SO_REUSEPORT 15
|
||||
#elif __solaris__
|
||||
#elif defined(__solaris__)
|
||||
#define SO_REUSEPORT 0x100e
|
||||
#elif defined(AIX) || defined(MACOSX)
|
||||
#define SO_REUSEPORT 0x0200
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#ifdef _ALLBSD_SOURCE
|
||||
#include <machine/endian.h>
|
||||
#elif __linux__
|
||||
#elif defined(__linux__)
|
||||
#define __USE_BSD 1
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -342,13 +342,13 @@ Java_sun_nio_ch_FileDispatcherImpl_setDirect0(JNIEnv *env, jclass clazz,
|
||||
JNU_ThrowIOExceptionWithLastError(env, "DirectIO setup failed");
|
||||
return result;
|
||||
}
|
||||
#elif F_NOCACHE
|
||||
#elif defined(F_NOCACHE)
|
||||
result = fcntl(fd, F_NOCACHE, 1);
|
||||
if (result == -1) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "DirectIO setup failed");
|
||||
return result;
|
||||
}
|
||||
#elif DIRECTIO_ON
|
||||
#elif defined(DIRECTIO_ON)
|
||||
result = directio(fd, DIRECTIO_ON);
|
||||
if (result == -1) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "DirectIO setup failed");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -564,9 +564,9 @@ GetJavaProperties(JNIEnv* env)
|
||||
}
|
||||
sprintf(buf, "%d.%d", majorVersion, minorVersion);
|
||||
sprops.os_version = _strdup(buf);
|
||||
#if _M_AMD64
|
||||
#if defined(_M_AMD64)
|
||||
sprops.os_arch = "amd64";
|
||||
#elif _X86_
|
||||
#elif defined(_X86_)
|
||||
sprops.os_arch = "x86";
|
||||
#else
|
||||
sprops.os_arch = "unknown";
|
||||
|
@ -43,7 +43,7 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if TARGET_OS_MAC
|
||||
#if defined(TARGET_OS_MAC)
|
||||
# pragma pack(push,2)
|
||||
#endif
|
||||
|
||||
@ -695,7 +695,7 @@ GSS_DLLIMP OM_uint32 gss_canonicalize_name(
|
||||
gss_name_t * /* output_name */
|
||||
);
|
||||
|
||||
#if TARGET_OS_MAC
|
||||
#if defined(TARGET_OS_MAC)
|
||||
# pragma pack(pop)
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -400,7 +400,7 @@ jobjectArray getRemoteAddresses(JNIEnv *env, jint fd, sctp_assoc_t id) {
|
||||
int i, addrCount;
|
||||
jobjectArray isaa;
|
||||
|
||||
#if __solaris__
|
||||
#if defined(__solaris__)
|
||||
if ((addrCount = nio_sctp_getpaddrs(fd, id, (void **)&addr_buf)) == -1) {
|
||||
#else /* __linux__ */
|
||||
if ((addrCount = nio_sctp_getpaddrs(fd, id, (struct sockaddr **)&addr_buf)) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user