[SERVER-2587] clean up places where we use __linux__ but mean posix Created: 18/Feb/11 Updated: 29/Aug/11 Resolved: 19/Apr/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
some examples: |
| Comments |
| Comment by Mathias Stearn [ 19/Apr/11 ] |
|
1) we don't currently directly test for POSIX anywhere. We use !defined(_WIN32) to mean POSIX. 2) I think all 11 current uses of _linux_ are correct, but there are three questionable cases in oid.cpp and nonce.cpp: unsigned OID::ourPid() { unsigned pid; #if defined(_WIN32) pid = (unsigned short) GetCurrentProcessId(); #elif defined(__linux__) || defined(__APPLE__) || defined(__sunos__) pid = (unsigned short) getpid(); #else pid = (unsigned short) security.getNonce(); #endif return pid; }#if defined(_linux) || defined(sunos) || defined(APPLE_) #if defined(_linux) || defined(sunos) || defined(APPLE_) Please reopen if you want any of these changed. |