summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-06 20:51:23 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-07 03:53:40 +0000
commit0495fc3bdd89d40fdb10108fea80f0cb8d9825de (patch)
treefb0819bbb341e6634b9205f9e5c5bcdd57b5d47b /CMakeLists.txt
parent5c388384329775538d618681f571d5f052bc2ae6 (diff)
downloadwireshark-0495fc3bdd89d40fdb10108fea80f0cb8d9825de.tar.gz
Add some notes about XLC, HP C, and Sun/Oracle C.
Change-Id: I2f65face2aa7354ec350aed308402bb719bd619f Reviewed-on: https://code.wireshark.org/review/17546 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b09c508a1..b192dc4835 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -349,10 +349,36 @@ else()
# Many modern compilers use c99 by default, but for older ones
# (like GCC 4.4.7), -std=gnu99 is required to avoid errors about
# use constructs like "for (int i = 0; i < n; i++) ;"
+ #
+ # Older versions of IBM XL C may require -qlanglvl=extc99.
+ # With V7.0, the "xlc" command defaults to C89; with 10.1,
+ # it defaults to C99 (both with IBM syntax extensions).
+ #
+ # HP's manual for HP C/HP-UX B.11.11.04 (the tenth
+ # edition of the manual), for PA-RISC, "documents
+ # new HP C features that support C99 industry standards".
+ # The manual for Version A.06.25 for Itanium mentions an
+ # -AC99 flag to support C99, but says it's the default;
+ # some older versions might require -AC99.
+ #
+ # As of Sun Studio 8, the compiler appears to default
+ # to supporting some C99 language features, but not
+ # C99 library differences from C89; -xc99 will give
+ # you both. The earlier Sun Forte Developer 6 update 2
+ # might or might not support thosee C99 language features
+ # by default, and doesn't speak of library differences;
+ # if it doesn't support the language features by default,
+ # -xc99 will support them.
+ #
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
endif()
else()
+ #
+ # Current versions of CMake do not support options to
+ # request C99 for XL C, HP C, or Oracle C. (They may
+ # not be necessary for current versions.)
+ #
set(CMAKE_C_STANDARD 99)
endif()