summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-03 00:28:47 +0000
committerMiles Bader <miles@gnu.org>1996-01-03 00:28:47 +0000
commita7daacb64d0d64743749d24d5fd001e7dfe89e10 (patch)
tree9ed0a368af50904180c2f2b6720f7439335d88d4 /libshouldbeinlibc
parentc4a29a3351e322be68012a9b0900c6c2939f6509 (diff)
(_argp_unlock_xxx): New function.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/argp-parse.c9
1 files changed, 9 insertions, 0 deletions
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. */