summaryrefslogtreecommitdiffstats
path: root/test-getsubopt.c
Commit message (Collapse)AuthorAgeFilesLines
* Change comment: NetBSD just fixed their headers; but leave theIngo Schwarze2018-08-151-1/+1
| | | | | workaround in place for now for the benefit of older systems, and other systems might contain similar problems.
* Autodetect whether _GNU_SOURCE or _OPENBSD_SOURCE are needed; theIngo Schwarze2018-08-151-4/+7
| | | | | latter is a NetBSD idiosyncrasy reported by wiz@. Also take into account that NetBSD declares getsubopt(3) in the wrong header.
* modernize style: "return" is not a functionIngo Schwarze2015-10-061-2/+2
|
* Do not require getsubopt() to provide extern char *suboptarg.Ingo Schwarze2014-08-171-4/+19
| | | | | | | | | | | | | | | | | | | | We don't use it anyway in mandoc. Like this, fewer systems need the compat implementation. In particular, we can now use the stock getsubopt() on glibc and musl. Besides, the comment in the BSD getsubopt.c that error messages are tricky without *suboptarg is massively overblown. If you simply save a copy of the pointer you pass into getsubopt(), that's quite usable for an error message. People start campaigning for the addition of *suboptarg to C libraries on the grounds that mandoc wants it, but actually, i consider library functions manipulating global data quite ugly, so stop pushing people into that questionable direction. While here, add an explicit Copyright header to the test file. While it's obviously to me what Kristaps intended, others might consider this file copyrightable and wonder what's up.
* Clean up feature tests:Ingo Schwarze2014-01-041-3/+10
| | | | | | * Split the configure steering script out of the Makefile. * Let the configure step depend on the test sources. * Clean up the test programs such that they can be run.
* Scary-looking but otherwise harmless changes allow me to build for Windows.Kristaps Dzonsons2011-07-241-0/+12
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.