From 1ba0631ca545a69488f4a60e051476fea067a154 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 22 Feb 2018 18:48:49 -0800 Subject: Add nng_opts_parse() API for handling command line options. We have implemented this alternative to getopt() so that we can create nngcat. The reason we did not just use getopt() is that getopt() does not understand long options (which nanocat uses, and we want to preserve for compatibility) and getopt() is not available on Windows (and possibly other non-POSIX platforms.) This function handles long and short options, but does not have support for option clustering. It also is threadsafe & reentrant, unlike getopt. --- src/supplemental/util/platform.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/supplemental/util/platform.h') diff --git a/src/supplemental/util/platform.h b/src/supplemental/util/platform.h index 1383fe15..fd287713 100644 --- a/src/supplemental/util/platform.h +++ b/src/supplemental/util/platform.h @@ -20,13 +20,13 @@ // APIs or Windows APIs, then by all means please feel free to simply // ignore this. +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - // nng_time represents an absolute time since some arbitrary point in the // past, measured in milliseconds. The values are always positive. typedef uint64_t nng_time; -- cgit v1.2.3-70-g09d2