head 1.2; access; symbols pkgsrc-2026Q1:1.1.0.86 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.84 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.82 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.80 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.78 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.76 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.74 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.72 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.70 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.68 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.66 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.64 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.62 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.60 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.58 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.56 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.54 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.52 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.50 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.48 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.46 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.44 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.42 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.38 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.18 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.40 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.36 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.34 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.32 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.30 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.28 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.26 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.24 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.22 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.20 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.16 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.14 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.12 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.10 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.8 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.6 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.4 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.2 pkgsrc-2015Q3-base:1.1; locks; strict; comment @// @; 1.2 date 2026.04.14.11.33.32; author jperkin; state Exp; branches; next 1.1; commitid GF19fdmcgKhr3VBG; 1.1 date 2015.07.03.20.40.59; author fhajny; state Exp; branches; next ; commitid hLfEJ7NShOl8FSry; desc @@ 1.2 log @openjdk8: Remove actively-harmful patch hunk. These prototypes differ depending on the platform, so leave it for the system headers to define correctly. @ text @$NetBSD: patch-hotspot_src_os_solaris_vm_os__solaris.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $ Misc SunOS casts. --- hotspot/src/os/solaris/vm/os_solaris.cpp.orig 2026-01-23 00:36:25.000000000 +0000 +++ hotspot/src/os/solaris/vm/os_solaris.cpp @@@@ -478,7 +482,7 @@@@ static bool assign_distribution(processo const processorid_t limit_id = max_id + 1; // Make up markers for available processors. bool* available_id = NEW_C_HEAP_ARRAY(bool, limit_id, mtInternal); - for (uint c = 0; c < limit_id; c += 1) { + for (processorid_t c = 0; c < limit_id; c += 1) { available_id[c] = false; } for (uint a = 0; a < id_length; a += 1) { @@@@ -501,7 +505,7 @@@@ static bool assign_distribution(processo // ... find the next available processor in the board. for (uint slot = 0; slot < processors_per_board; slot += 1) { uint try_id = board * processors_per_board + slot; - if ((try_id < limit_id) && (available_id[try_id] == true)) { + if ((try_id < (uint)limit_id) && (available_id[try_id] == true)) { distribution[assigned] = try_id; available_id[try_id] = false; assigned += 1; @@@@ -509,7 +513,7 @@@@ static bool assign_distribution(processo } } board += 1; - if (board * processors_per_board + 0 >= limit_id) { + if (board * processors_per_board + 0 >= (uint)limit_id) { board = 0; } } @@@@ -573,7 +577,7 @@@@ bool os::bind_to_processor(uint processo bool os::getenv(const char* name, char* buffer, int len) { char* val = ::getenv( name ); if ( val == NULL - || strlen(val) + 1 > len ) { + || strlen(val) + 1 > (size_t)len ) { if (len > 0) buffer[0] = 0; // return a null string return false; } @@@@ -752,7 +756,7 @@@@ void os::init_system_properties_values() } else { int inserted = 0; int i; - for (i = 0; i < info->dls_cnt; i++, path++) { + for (i = 0; (uint_t)i < info->dls_cnt; i++, path++) { uint_t flags = path->dls_flags & LA_SER_MASK; if (((flags & LA_SER_LIBPATH) == 0) && !inserted) { strcat(library_path, common_path); @@@@ -858,7 +862,8 @@@@ extern "C" void* java_start(void* thread // in java_to_os_priority. So we save the native priority // in the osThread and recall it here. - if ( osthr->thread_id() != -1 ) { + // thread_id_t ("osThread_solaris.hpp") == thread_t () == unsigned int + if ( osthr->thread_id() != (unsigned int)-1 ) { if ( UseThreadPriorities ) { int prio = osthr->native_priority(); if (ThreadPriorityVerbose) { @@@@ -2717,7 +2722,7 @@@@ void os::numa_make_global(char *addr, si // Get the number of the locality groups. size_t os::numa_get_groups_num() { size_t n = Solaris::lgrp_nlgrps(Solaris::lgrp_cookie()); - return n != -1 ? n : 1; + return n != (size_t) -1 ? n : 1; } // Get a list of leaf locality groups. A leaf lgroup is group that @@@@ -2729,7 +2734,7 @@@@ size_t os::numa_get_leaf_groups(int *ids return 1; } int result_size = 0, top = 1, bottom = 0, cur = 0; - for (int k = 0; k < size; k++) { + for (size_t k = 0; k < size; k++) { int r = Solaris::lgrp_children(Solaris::lgrp_cookie(), ids[cur], (Solaris::lgrp_id_t*)&ids[top], size - top); if (r == -1) { @@@@ -2849,7 +2854,7 @@@@ char *os::scan_pages(char *start, char* } if ((validity[i] & 2) != 0 && page_expected->lgrp_id > 0) { - if (outdata[types * i] != page_expected->lgrp_id) { + if (outdata[types * i] != (uint64_t)page_expected->lgrp_id) { break; } } @@@@ -4645,7 +4650,7 @@@@ const char * signames[] = { const char* os::exception_name(int exception_code, char* buf, size_t size) { if (0 < exception_code && exception_code <= SIGRTMAX) { // signal - if (exception_code < sizeof(signames)/sizeof(const char*)) { + if ((size_t)exception_code < sizeof(signames)/sizeof(const char*)) { jio_snprintf(buf, size, "%s", signames[exception_code]); } else { jio_snprintf(buf, size, "SIG%d", exception_code); @@@@ -4985,7 +4990,7 @@@@ void os::init(void) { // If the pagesize of the VM is greater than 8K determine the appropriate // number of initial guard pages. The user can change this with the // command line arguments, if needed. - if (vm_page_size() > 8*K) { + if ((size_t)vm_page_size() > 8*K) { StackYellowPages = 1; StackRedPages = 1; StackShadowPages = round_to((StackShadowPages*8*K), vm_page_size()) / vm_page_size(); @@@@ -5006,7 +5011,7 @@@@ jint os::init_2(void) { // Allocate a single page and mark it as readable for safepoint polling. Also // use this first mmap call to check support for MAP_ALIGN. - address polling_page = (address)Solaris::mmap_chunk((char*)page_size, + address polling_page = (address)Solaris::mmap_chunk((char*)(uintptr_t)page_size, page_size, MAP_PRIVATE | MAP_ALIGN, PROT_READ); @@@@ -5058,7 +5063,7 @@@@ jint os::init_2(void) { // stack on a power of 2 boundary. The real fix for this // should be to fix the guard page mechanism. - if (vm_page_size() > 8*K) { + if ((size_t)vm_page_size() > 8*K) { threadStackSizeInBytes = (threadStackSizeInBytes != 0) ? threadStackSizeInBytes + ((StackYellowPages + StackRedPages) * vm_page_size()) @ 1.1 log @Add support for building with GCC on SunOS, largely based on openjdk7 patches by jesse et al. Fixes build on SunOS. @ text @d1 1 a1 1 $NetBSD: patch-hotspot_src_os_solaris_vm_os__solaris.cpp,v 1.1 2013/06/15 09:31:05 jperkin Exp $ d5 1 a5 1 --- hotspot/src/os/solaris/vm/os_solaris.cpp.orig 2015-06-10 10:31:52.000000000 +0000 d7 1 a7 14 @@@@ -113,6 +113,12 @@@@ #define MAX_PATH (2 * K) +/* Declare madvise where it is not declared for C++, like Solaris */ +#if defined(__sun) && defined(_XOPEN_SOURCE) +extern "C" int memcntl(caddr_t, size_t, int, caddr_t, int, int); +extern "C" int madvise(caddr_t, size_t, int); +#endif + // for timer info max values which include all bits #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) @@@@ -534,7 +540,7 @@@@ static bool assign_distribution(processo d16 1 a16 1 @@@@ -557,7 +563,7 @@@@ static bool assign_distribution(processo d25 1 a25 1 @@@@ -565,7 +571,7 @@@@ static bool assign_distribution(processo d34 1 a34 1 @@@@ -622,7 +628,7 @@@@ bool os::bind_to_processor(uint processo d43 1 a43 1 @@@@ -801,7 +807,7 @@@@ void os::init_system_properties_values() d52 1 a52 1 @@@@ -907,7 +913,8 @@@@ extern "C" void* java_start(void* thread d62 1 a62 1 @@@@ -2786,7 +2793,7 @@@@ void os::numa_make_global(char *addr, si d71 1 a71 1 @@@@ -2798,7 +2805,7 @@@@ size_t os::numa_get_leaf_groups(int *ids d80 1 a80 1 @@@@ -2918,7 +2925,7 @@@@ char *os::scan_pages(char *start, char* d89 1 a89 1 @@@@ -4685,7 +4692,7 @@@@ const char * signames[] = { d98 1 a98 1 @@@@ -5017,7 +5024,7 @@@@ void os::init(void) { d107 1 a107 1 @@@@ -5038,7 +5045,7 @@@@ jint os::init_2(void) { d116 1 a116 1 @@@@ -5090,7 +5097,7 @@@@ jint os::init_2(void) { @