coding style - Difference between #ifdef __linux and #ifdef __unix in C++ header file -


i've seen boilerplate header file code dealing different os's, following:

#ifdef __win32     //windows #elif __linux     //linux #elif __unix     //all unix not captured above #endif 

if __unix catches unices not captured __linux, why not use __unix? i'm assuming it's sort of safeguard, "if __linux isn't enough, use this".

however, there has reason both used, instead of having catch-all __unix (once again, assumption may wrong).

what's deal?

as have been stated in comments unix , linux 2 different operating systems , although large amount of software compatible have separate licensing structure. means number of tools available in linux not available in unix , vice versa. example of unix's zfs file system cannot distributed under same license linux , result support not included in stock linux kernels (although possible compile custom kernel support). in terms of particular boiler plate covering basis , used take advantage of particular tools available on each operating system.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -