3 ms·
In the exceedingly rare event that you need to target Windows?
by theseoafs 10y ago
In the exceedingly rare event that you need to target Windows?
- michael_h 10y ago#define strdup _strdup
- pjmlp 10y agoWindows isn't the only non-POSIX OS out there, maybe for the HN crowd I guess.
- deathanatos 10y agoHonestly, when I wrote the post, I thought I recalled that Windows had strdup (Windows does include some limited POSIX functionality, IIRC; e.g., "select" definitely exists, and is also a POSIX function, so I figured surely strdup was there.) MSDN seems to indicate that Windows does in fact have strdup — and that it's "deprecated" in favor of "_strdup", which appears to do exactly the same thing as strdup… what on earth is going on here?