diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-24 18:15:13 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-24 18:15:13 +0000 |
commit | 9d40bd2a7ce3100befc3054237b3cb3a8bc9777d (patch) | |
tree | 3da90ac84a9ba5f4aa9e551ab6e61969d88b7cd7 /test-strptime.c | |
parent | 0db02e2364d93cad88a1df785984438635066e39 (diff) | |
download | mandoc-9d40bd2a7ce3100befc3054237b3cb3a8bc9777d.tar.gz |
Scary-looking but otherwise harmless changes allow me to build for Windows.
That is to say, with mingw32. This amounts to the following:
(1) break compat.c into compat_strlcpy.c and compat_strlcat.c
(2) add compat_getsubopt.c (from OpenBSD) and test-getsubopt.c
(3) add test-strptime.c for HAVE_STRPTIME
(4) add ifdef bits here and there, where necessary
(5) remove some harmless unportable stuff (u_char, localtime_r)
I've added the appropriate mdocml.zip target to the Makefile, too.
Diffstat (limited to 'test-strptime.c')
-rw-r--r-- | test-strptime.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test-strptime.c b/test-strptime.c new file mode 100644 index 00000000..976e9c80 --- /dev/null +++ b/test-strptime.c @@ -0,0 +1,13 @@ +#if defined(__linux__) || defined(__MINT__) +# define _GNU_SOURCE /* strptime(), getsubopt() */ +#endif + +#include <time.h> + +int +main(int argc, char **argv) +{ + struct tm tm; + strptime(*argv, "%D", &tm); + return 0; +} |