mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8339783: Implement JEP 479: Remove the Windows 32-bit x86 Port
Reviewed-by: kbarrett, kvn, stuefe, shade, erikj
This commit is contained in:
parent
2eeaa57b19
commit
79345bbbae
85 changed files with 349 additions and 1840 deletions
|
@ -48,6 +48,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define JNICALL
|
||||
|
||||
/*
|
||||
* JNI Types
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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
|
||||
|
@ -58,7 +58,6 @@ static jboolean initIDs(JNIEnv *env)
|
|||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Support for finding JNI_On(Un)Load_<lib_name> if it exists.
|
||||
* If cname == NULL then just find normal JNI_On(Un)Load entry point
|
||||
|
@ -93,7 +92,11 @@ static void *findJniFunction(JNIEnv *env, void *handle,
|
|||
JNU_ThrowOutOfMemoryError(env, NULL);
|
||||
goto done;
|
||||
}
|
||||
buildJniFunctionName(syms[i], cname, jniFunctionName);
|
||||
strcpy(jniFunctionName, syms[i]);
|
||||
if (cname != NULL) {
|
||||
strcat(jniFunctionName, "_");
|
||||
strcat(jniFunctionName, cname);
|
||||
}
|
||||
entryName = JVM_FindLibraryEntry(handle, jniFunctionName);
|
||||
free(jniFunctionName);
|
||||
if(entryName) {
|
||||
|
|
|
@ -356,9 +356,6 @@ JNIEXPORT void InitializeEncoding(JNIEnv *env, const char *name);
|
|||
|
||||
void* getProcessHandle();
|
||||
|
||||
void buildJniFunctionName(const char *sym, const char *cname,
|
||||
char *jniEntryName);
|
||||
|
||||
jstring getLastErrorString(JNIEnv *env);
|
||||
|
||||
JNIEXPORT int JNICALL
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, 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
|
||||
|
@ -52,8 +52,6 @@
|
|||
#define JNIIMPORT
|
||||
#endif
|
||||
|
||||
#define JNICALL
|
||||
|
||||
typedef int jint;
|
||||
#ifdef _LP64
|
||||
typedef long jlong;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2024, 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
|
||||
|
@ -51,15 +51,6 @@ void* getProcessHandle() {
|
|||
return procHandle;
|
||||
}
|
||||
|
||||
void buildJniFunctionName(const char *sym, const char *cname,
|
||||
char *jniEntryName) {
|
||||
strcpy(jniEntryName, sym);
|
||||
if (cname != NULL) {
|
||||
strcat(jniEntryName, "_");
|
||||
strcat(jniEntryName, cname);
|
||||
}
|
||||
}
|
||||
|
||||
jstring
|
||||
getLastErrorString(JNIEnv *env)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, 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
|
||||
|
@ -30,7 +30,6 @@
|
|||
#define JNIEXPORT __declspec(dllexport)
|
||||
#endif
|
||||
#define JNIIMPORT __declspec(dllimport)
|
||||
#define JNICALL __stdcall
|
||||
|
||||
typedef int jint;
|
||||
typedef long long jlong;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2024, 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
|
||||
|
@ -28,8 +28,3 @@
|
|||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#ifndef _WIN64
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
typedef unsigned long DWORD_PTR, *PDWORD_PTR;
|
||||
#endif
|
||||
|
|
|
@ -552,8 +552,6 @@ GetJavaProperties(JNIEnv* env)
|
|||
sprops.os_version = _strdup(buf);
|
||||
#if defined(_M_AMD64)
|
||||
sprops.os_arch = "amd64";
|
||||
#elif defined(_X86_)
|
||||
sprops.os_arch = "x86";
|
||||
#elif defined(_M_ARM64)
|
||||
sprops.os_arch = "aarch64";
|
||||
#else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, 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
|
||||
|
@ -63,15 +63,8 @@
|
|||
/* For static variables initialized to zero */
|
||||
#define jlong_zero_init ((jlong) 0)
|
||||
|
||||
#ifdef _WIN64
|
||||
#define jlong_to_ptr(a) ((void*)(a))
|
||||
#define ptr_to_jlong(a) ((jlong)(a))
|
||||
#else
|
||||
/* Double casting to avoid warning messages looking for casting of */
|
||||
/* smaller sizes into pointers */
|
||||
#define jlong_to_ptr(a) ((void*)(int)(a))
|
||||
#define ptr_to_jlong(a) ((jlong)(int)(a))
|
||||
#endif
|
||||
|
||||
#define jint_to_jlong(a) ((jlong)(a))
|
||||
#define jlong_to_jint(a) ((jint)(a))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, 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
|
||||
|
@ -35,34 +35,6 @@ void* getProcessHandle() {
|
|||
return (void*)GetModuleHandle(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Windows symbols can be simple like JNI_OnLoad or __stdcall format
|
||||
* like _JNI_OnLoad@8. We need to handle both.
|
||||
*/
|
||||
void buildJniFunctionName(const char *sym, const char *cname,
|
||||
char *jniEntryName) {
|
||||
if (cname != NULL) {
|
||||
char *p = strrchr(sym, '@');
|
||||
if (p != NULL && p != sym) {
|
||||
// sym == _JNI_OnLoad@8
|
||||
strncpy(jniEntryName, sym, (p - sym));
|
||||
jniEntryName[(p-sym)] = '\0';
|
||||
// jniEntryName == _JNI_OnLoad
|
||||
strcat(jniEntryName, "_");
|
||||
strcat(jniEntryName, cname);
|
||||
strcat(jniEntryName, p);
|
||||
//jniEntryName == _JNI_OnLoad_cname@8
|
||||
} else {
|
||||
strcpy(jniEntryName, sym);
|
||||
strcat(jniEntryName, "_");
|
||||
strcat(jniEntryName, cname);
|
||||
}
|
||||
} else {
|
||||
strcpy(jniEntryName, sym);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
jstring
|
||||
getLastErrorString(JNIEnv *env) {
|
||||
|
||||
|
|
|
@ -681,7 +681,7 @@ void* SplashProcAddress(const char* name) {
|
|||
/*
|
||||
* Signature adapter for _beginthreadex().
|
||||
*/
|
||||
static unsigned __stdcall ThreadJavaMain(void* args) {
|
||||
static unsigned ThreadJavaMain(void* args) {
|
||||
return (unsigned)JavaMain(args);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2024, 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
|
||||
|
@ -69,9 +69,7 @@ Java_sun_nio_ch_WindowsSelectorImpl_00024SubSelector_poll0(JNIEnv *env, jobject
|
|||
static struct timeval zerotime = {0, 0};
|
||||
int read_count = 0, write_count = 0, except_count = 0;
|
||||
|
||||
#ifdef _WIN64
|
||||
int resultbuf[FD_SETSIZE + 1];
|
||||
#endif
|
||||
|
||||
if (timeout == 0) {
|
||||
tv = &zerotime;
|
||||
|
@ -121,7 +119,6 @@ Java_sun_nio_ch_WindowsSelectorImpl_00024SubSelector_poll0(JNIEnv *env, jobject
|
|||
/* Return selected sockets. */
|
||||
/* Each Java array consists of sockets count followed by sockets list */
|
||||
|
||||
#ifdef _WIN64
|
||||
resultbuf[0] = readfds->fd_count;
|
||||
for (i = 0; i < (int)readfds->fd_count; i++) {
|
||||
resultbuf[i + 1] = (int)readfds->fd_array[i];
|
||||
|
@ -142,15 +139,7 @@ Java_sun_nio_ch_WindowsSelectorImpl_00024SubSelector_poll0(JNIEnv *env, jobject
|
|||
}
|
||||
(*env)->SetIntArrayRegion(env, returnExceptFds, 0,
|
||||
exceptfds->fd_count + 1, resultbuf);
|
||||
#else
|
||||
(*env)->SetIntArrayRegion(env, returnReadFds, 0,
|
||||
readfds->fd_count + 1, (jint *)readfds);
|
||||
|
||||
(*env)->SetIntArrayRegion(env, returnWriteFds, 0,
|
||||
writefds->fd_count + 1, (jint *)writefds);
|
||||
(*env)->SetIntArrayRegion(env, returnExceptFds, 0,
|
||||
exceptfds->fd_count + 1, (jint *)exceptfds);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2024, 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
|
||||
|
@ -47,26 +47,14 @@ jint convertReturnVal(JNIEnv *env, jint n, jboolean r);
|
|||
jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean r);
|
||||
jboolean purgeOutstandingICMP(JNIEnv *env, jclass clazz, jint fd);
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
struct iovec {
|
||||
jlong iov_base;
|
||||
jint iov_len;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
struct iovec {
|
||||
jint iov_base;
|
||||
jint iov_len;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* Defined in UnixDomainSockets.c */
|
||||
|
||||
jbyteArray sockaddrToUnixAddressBytes(JNIEnv *env, struct sockaddr_un *sa, socklen_t len);
|
||||
|
||||
jint unixSocketAddressToSockaddr(JNIEnv *env, jbyteArray uaddr,
|
||||
struct sockaddr_un *sa, int *len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue