aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.developer
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-11-01 08:47:42 +0000
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-11-01 20:01:11 +0000
commit4ff22025e83cfddb4cc1694dc0185133e157c899 (patch)
tree9a3507561c70e34a28db1cca152283d663cdd655 /doc/README.developer
parent72ad7d9cdd4384857eec31d7ae295a330aa2d0ff (diff)
README.developer: Add note about portability on Windows
Diffstat (limited to 'doc/README.developer')
-rw-r--r--doc/README.developer10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 65919d68ce..90089923dd 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -430,6 +430,16 @@ Wireshark uses Libgcrypt as general-purpose crypto library. To use it from
your dissector, do not include gcrypt.h directly, but use the wrapper file
wsutil/wsgcrypt.h instead.
+We support building on Windows using MinGW-w64 (experimental) so be mindful
+of the difference between an #ifdef on _WIN32 and _MSC_VER. The first tests
+if the platform is some version of Windows and also applies to MinGW. The
+latter tests if the toolchain is Microsoft Visual Studio. Sometimes you need
+one or the other, depending on whether the condition applies to all Windows
+compilers or only Microsoft's compiler. Use #ifdef __MINGW32__ to test for
+a MinGW toolchain, including MinGW-w64. The same concern applies to CMake
+code. Depending on the particular situation you may need to use if(WIN32) or
+if(MSVC) or if(MINGW).
+
2. String handling
Do not use functions such as strcat() or strcpy().