comparison src/share/vm/utilities/globalDefinitions.hpp @ 12823:b756e7a2ec33

Added tag jdk-9+181 for changeset 4a443796f6f5
author prr
date Thu, 03 Aug 2017 18:56:57 +0000
parents d9aa9adb7dd2
children
comparison
equal deleted inserted replaced
114:291d8b015611 115:a1c2848b4bec
1 /* 1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
1093 1093
1094 #ifdef min 1094 #ifdef min
1095 #undef min 1095 #undef min
1096 #endif 1096 #endif
1097 1097
1098 #define max(a,b) Do_not_use_max_use_MAX2_instead 1098 // The following defines serve the purpose of preventing use of accidentally
1099 #define min(a,b) Do_not_use_min_use_MIN2_instead 1099 // included min max macros from compiling, while continuing to allow innocent
1100 // min and max identifiers in the code to compile as intended.
1101 #define max max
1102 #define min min
1100 1103
1101 // It is necessary to use templates here. Having normal overloaded 1104 // It is necessary to use templates here. Having normal overloaded
1102 // functions does not work because it is necessary to provide both 32- 1105 // functions does not work because it is necessary to provide both 32-
1103 // and 64-bit overloaded functions, which does not work, and having 1106 // and 64-bit overloaded functions, which does not work, and having
1104 // explicitly-typed versions of these routines (i.e., MAX2I, MAX2L) 1107 // explicitly-typed versions of these routines (i.e., MAX2I, MAX2L)