lneely / pcloudcc-lneely

pcloudcc-lneely is an independent fork of the inactive pcloudcom/console-client
0 stars 1 forks source link

Simplify P_OS_POSIX / P_OS_LINUX conditions #14

Closed lneely closed 4 days ago

lneely commented 4 days ago

If P_OS_LINUX is defined, then P_OS_POSIX is also defined. Unless the implementations are mutually exclusive -- i.e., if P_OS_LINUX {do stuff} else P_OS_POSIX {do other stuff} -- then the POSIX condition should be removed.

In other words, code that looks like this:

#if defined(P_OS_LINUX)
// linux code here
#endif 

#if defined(P_OS_POSIX)
// POSIX code here
#endif 

should be changed to:

#if defined(P_OS_LINUX)
// linux code here
#endif 

// POSIX code here
lneely commented 4 days ago

All P_OS_POSIX checks could be safely removed. pcloudcc now assumes / requires a POSIX-compliant system, or Linux where applicable.