mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8217093: Support extended-length paths in parse_manifest.c on windows
Reviewed-by: chegar, clanger
This commit is contained in:
parent
13a52f3a17
commit
38463aa959
3 changed files with 64 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
|
@ -89,7 +89,8 @@ JLI_GetAppArgIndex();
|
|||
#include <process.h>
|
||||
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
|
||||
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
|
||||
int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
|
||||
int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
|
||||
int JLI_Open(const char* name, int flags);
|
||||
JNIEXPORT void JNICALL
|
||||
JLI_CmdToArgs(char *cmdline);
|
||||
#define JLI_Lseek _lseeki64
|
||||
|
@ -101,6 +102,7 @@ JLI_CmdToArgs(char *cmdline);
|
|||
#define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2))
|
||||
#define JLI_StrNCaseCmp(p1, p2, p3) strncasecmp((p1), (p2), (p3))
|
||||
#define JLI_Snprintf snprintf
|
||||
#define JLI_Open open
|
||||
#define JLI_PutEnv putenv
|
||||
#define JLI_GetPid getpid
|
||||
#ifdef __solaris__
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -362,9 +362,11 @@ find_file(int fd, zentry *entry, const char *file_name)
|
|||
bp = buffer;
|
||||
|
||||
if (find_positions(fd, bp, &base_offset, &censtart) == -1) {
|
||||
free(buffer);
|
||||
return -1;
|
||||
}
|
||||
if (JLI_Lseek(fd, censtart, SEEK_SET) < (jlong) 0) {
|
||||
free(buffer);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -583,7 +585,7 @@ JLI_ParseManifest(char *jarfile, manifest_info *info)
|
|||
int rc;
|
||||
char *splashscreen_name = NULL;
|
||||
|
||||
if ((fd = open(jarfile, O_RDONLY
|
||||
if ((fd = JLI_Open(jarfile, O_RDONLY
|
||||
#ifdef O_LARGEFILE
|
||||
| O_LARGEFILE /* large file mode */
|
||||
#endif
|
||||
|
@ -640,7 +642,7 @@ JLI_JarUnpackFile(const char *jarfile, const char *filename, int *size) {
|
|||
zentry entry;
|
||||
void *data = NULL;
|
||||
|
||||
if ((fd = open(jarfile, O_RDONLY
|
||||
if ((fd = JLI_Open(jarfile, O_RDONLY
|
||||
#ifdef O_LARGEFILE
|
||||
| O_LARGEFILE /* large file mode */
|
||||
#endif
|
||||
|
@ -688,7 +690,7 @@ JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data)
|
|||
char *value;
|
||||
int rc;
|
||||
|
||||
if ((fd = open(jarfile, O_RDONLY
|
||||
if ((fd = JLI_Open(jarfile, O_RDONLY
|
||||
#ifdef O_LARGEFILE
|
||||
| O_LARGEFILE /* large file mode */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue