8324539: Do not use LFS64 symbols in JDK libs

Reviewed-by: jwaters, erikj, mbaesken, alanb
This commit is contained in:
Magnus Ihse Bursie 2024-02-12 08:04:39 +00:00
parent efa071dd06
commit e5cb78cc88
29 changed files with 166 additions and 287 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -100,16 +100,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_Open open
#ifdef __linux__
#define _LARGFILE64_SOURCE
#define JLI_Lseek lseek64
#endif
#ifdef MACOSX
#define JLI_Lseek lseek
#endif
#ifdef _AIX
#define JLI_Lseek lseek
#endif
#endif /* _WIN32 */
/*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -100,14 +100,6 @@
#include <dirent.h>
#endif /* Unix */
#if defined(_AIX)
#define DIR DIR64
#define dirent dirent64
#define opendir opendir64
#define readdir readdir64
#define closedir closedir64
#endif
static int
exists(const char* filename)
{

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -46,11 +46,6 @@
#include "zip_util.h"
#include <zlib.h>
#ifdef _ALLBSD_SOURCE
#define off64_t off_t
#define mmap64 mmap
#endif
/* USE_MMAP means mmap the CEN & ENDHDR part of the zip file. */
#ifdef USE_MMAP
#include <sys/mman.h>
@ -656,7 +651,7 @@ readCEN(jzfile *zip, jint knownTotal)
*/
zip->mlen = cenpos - offset + cenlen + endhdrlen;
zip->offset = offset;
mappedAddr = mmap64(0, zip->mlen, PROT_READ, MAP_SHARED, zip->zfd, (off64_t) offset);
mappedAddr = mmap(0, zip->mlen, PROT_READ, MAP_SHARED, zip->zfd, (off_t) offset);
zip->maddr = (mappedAddr == (void*) MAP_FAILED) ? NULL :
(unsigned char*)mappedAddr;