From f67bb2baf4672e00fe99e8548fb85d9a9c83e127 Mon Sep 17 00:00:00 2001 From: David Cole <dcole@neocisinc.com> Date: Tue, 15 Oct 2013 11:27:46 -0400 Subject: [PATCH] SystemTools: Move typedef mode_t inside the SystemTools class Cleans up a smidge of global namespace pollution. Allows using this header file in the same compilation unit with other header files that may also contain a mode_t typedef, possibly with a different underlying type. Actually encountered in the wild when trying to compile a class that uses both log4cpp and VTK. Change-Id: Iba5592778fc21d66946026847537d914e56f332b --- SystemTools.hxx.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index d6dae398..85bdeccd 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -42,10 +42,6 @@ namespace @KWSYS_NAMESPACE@ } #endif // va_list -#if defined( _MSC_VER ) -typedef unsigned short mode_t; -#endif - /* Define these macros temporarily to keep the code readable. */ #if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS # define kwsys_stl @KWSYS_NAMESPACE@_stl @@ -684,6 +680,10 @@ public: */ static long int CreationTime(const char* filename); + #if defined( _MSC_VER ) + typedef unsigned short mode_t; + #endif + /** * Get and set permissions of the file. */ -- GitLab