getopt: allow compilation with C++
authorEric Blake <eblake@redhat.com>
Fri, 16 Apr 2010 20:08:15 +0000 (14:08 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 16 Apr 2010 21:39:47 +0000 (15:39 -0600)
commite7b3c4c773c4475324b15587b3d89ce227698d7c
tree3b163a46a4810793e27878cf9546d1717bb31c82
parentae75893767727a7cd6b85c6bafe5cbe356d0f56b
getopt: allow compilation with C++

A C++ compiler complains that REQUIRE_ORDER is unknown if it is
buried inside the struct.

* lib/getopt_int.h (__ordering): Hoist enum declaration outside
struct.
* lib/getopt.c (_getopt_internal_r): Use correct type.
Reported by Dagobert Michelson, via Joel E. Denny.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/getopt.c
lib/getopt_int.h