Menu

#2084 Compiling on macOS ends up in the Windows code

Bug
closed-fixed
5
2019-03-07
2019-02-25
No

The source code is full of

#ifdef __unix__
  // ...
#else
   // windows
 #endif

and compiling on macOS always ends up in the else part. Could you perhaps add something like

#if defined(__unix__) || defined(__APPLE__)

or perhaps, like the following article suggests:
http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#HowtodetectPOSIXandUNIX

#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))

I had issues with FileWorker.cxx and FilePath.cxx, but I didn't yet manage to overcome all the issues, the next one being

DirectorExtension.cxx:84:29: error: use of undeclared identifier 'MAX_PATH'
static char requestPipeName[MAX_PATH];
                            ^

Discussion

  • Neil Hodgson

    Neil Hodgson - 2019-02-26
    • labels: --> scite, gtk
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Mojca Miklavec

    Mojca Miklavec - 2019-02-26

    Perfect, thank you!

     
  • Neil Hodgson

    Neil Hodgson - 2019-03-07
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB