From: Solomon P. <pi...@sh...> - 2024-07-10 19:31:09
|
On Wed, Jul 10, 2024 at 01:54:56PM -0400, Greg Troxel wrote: > That is great progress to get it to build. Did you, or could you, try > with removing the -DPOSIX_C_SOURCE=200809L, and leaving --std=c99? I > am guessing that will be ok. We definitely need --std=c99, as the codebase increasingly uses c99-isms and we don't know the defaults of whatever compiler is being used. -DPOSIX_C_SOURCE=200809L is used to pull in strdup(), which is not part of the c99 stdlib but is required by POSIX. This is on glibc at least, the BSDs and MacOS clearly differ. The manpage on Linux says -D_XOPEN_SOURCE >= 500 would also work, but I don't know what other side effects that might have. Wihtout --std=c99, GCC likely defualts to 'gnuXX' (where XX depends on the exact version of the compiler) which defines _GNU_SOURCE and in turn also pulls in strdup(). ..Hilariously, we already have a stp_strdup() function for this exact reason. That said, there's also localtime_r (which also relies on POSIX_SOURCE and maybe BSD_SOURCE) and possibly some other stuff too. - Solomon -- Solomon Peachy pizza at shaftnet dot org (email&xmpp) @pizza:shaftnet dot org (matrix) Dowling Park, FL speachy (libera.chat) |