~sircmpwn/public-inbox

General catch-all for patches, questions, and discussions for sircmpwn's projects that don't have their own mailing list.

When posting patches to this list, please edit the [PATCH] line to include the specific project you're contributing to, e.g.

[PATCH scdoc v2] Add thing to stuff

Patches

3 2

[scdoc][patch] Define _XOPEN_SOURCE_EXTENDED to fix OpenBSD build errors.

Stephen Gregoratto
Details
Message ID
<20181120221018.15646-1-dev@sgregoratto.me>
Download raw message
Patch +1 -0
Tested on Linux, FreeBSD and OpenBSD.
---
 src/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main.c b/src/main.c
index 10ba587..36f5a9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,5 @@
 #define _XOPEN_SOURCE
+#define _XOPEN_SOURCE_EXTENDED 1
 #include <assert.h>
 #include <ctype.h>
 #include <stdbool.h>
-- 
2.19.1
Details
Message ID
<20181120224118.GB2130@homura.localdomain>
In-Reply-To
<20181120221018.15646-1-dev@sgregoratto.me> (view parent)
Download raw message
Can you try defining _XOPEN_SOURCE 500 first?
Details
Message ID
<20181120224150.GC2130@homura.localdomain>
In-Reply-To
<20181120221018.15646-1-dev@sgregoratto.me> (view parent)
Download raw message
Also, please use theis command to configure git for sending emails to
this list:

git config format.subjectPrefix 'PATCH scdoc'

Thank you!
Details
Message ID
<SIRKKEVLrnJEoESTt4WQa_EUrg4eRS8_mot6gNGWV4L2awOnH426QyswRFSFcnoWTnR_ToBz8IB0kWAg4dSSQxDUpvZWJw6OJgThSctgHBk=@emersion.fr>
In-Reply-To
<20181120221018.15646-1-dev@sgregoratto.me> (view parent)
Download raw message
From the feature_test_macros(7) manpage:

> Defining _XOPEN_SOURCE with a value of 500 or more also produces the same
> effect as defining _XOPEN_SOURCE_EXTENDED.  Use of _XOPEN_SOURCE_EXTENDED in
> new source code should be avoided.

Can you try _XOPEN_SOURCE set to 500 instead?

(Unfortunately it seems _POSIX_C_SOURCE isn't enough for strptime)