From a7daacb64d0d64743749d24d5fd001e7dfe89e10 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 3 Jan 1996 00:28:47 +0000 Subject: (_argp_unlock_xxx): New function. --- libshouldbeinlibc/argp-parse.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libshouldbeinlibc/argp-parse.c') diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c index f27bcd51..c52bc1f1 100644 --- a/libshouldbeinlibc/argp-parse.c +++ b/libshouldbeinlibc/argp-parse.c @@ -92,6 +92,15 @@ find_long_option (struct option *long_options, const char *name) /* Used to regulate access to the getopt routines, which are non-reentrant. */ static struct mutex getopt_lock = MUTEX_INITIALIZER; +/* This hack to allow programs that know what's going on to call argp + recursively. If someday argp is changed not to use the non-reentrant + getopt interface, we can get rid of this shit. XXX */ +void +_argp_unlock_xxx () +{ + mutex_unlock (&getopt_lock); +} + /* The state of a `group' during parsing. Each group corresponds to a particular argp structure from the tree of such descending from the top level argp passed to argp_parse. */ -- cgit v1.2.3