xref: /netbsd-src/external/bsd/openldap/dist/include/getopt-compat.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1*549b59edSchristos /*	$NetBSD: getopt-compat.h,v 1.3 2021/08/14 16:14:55 christos Exp $	*/
24e6df137Slukem 
32de962bdSlukem /* getopt-compat.h -- getopt(3) compatibility header */
4d11b170bStron /* $OpenLDAP$ */
52de962bdSlukem /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
62de962bdSlukem  *
7*549b59edSchristos  * Copyright 1998-2021 The OpenLDAP Foundation.
82de962bdSlukem  * All rights reserved.
92de962bdSlukem  *
102de962bdSlukem  * Redistribution and use in source and binary forms, with or without
112de962bdSlukem  * modification, are permitted only as authorized by the OpenLDAP
122de962bdSlukem  * Public License.
132de962bdSlukem  *
142de962bdSlukem  * A copy of this license is available in file LICENSE in the
152de962bdSlukem  * top-level directory of the distribution or, alternatively, at
162de962bdSlukem  * <http://www.OpenLDAP.org/license.html>.
172de962bdSlukem  */
182de962bdSlukem 
192de962bdSlukem /*
202de962bdSlukem  * getopt(3) declarations
212de962bdSlukem  */
222de962bdSlukem #ifndef _GETOPT_COMPAT_H
232de962bdSlukem #define _GETOPT_COMPAT_H
242de962bdSlukem 
252de962bdSlukem #include <ldap_cdefs.h>
262de962bdSlukem 
272de962bdSlukem LDAP_BEGIN_DECL
282de962bdSlukem 
292de962bdSlukem /* change symbols to avoid clashing */
302de962bdSlukem #define optarg lutil_optarg
312de962bdSlukem #define optind lutil_optind
322de962bdSlukem #define opterr lutil_opterr
332de962bdSlukem #define optopt lutil_optopt
342de962bdSlukem #define getopt lutil_getopt
352de962bdSlukem 
362de962bdSlukem LDAP_LUTIL_V (char *) optarg;
372de962bdSlukem LDAP_LUTIL_V (int) optind, opterr, optopt;
382de962bdSlukem LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *));
392de962bdSlukem 
402de962bdSlukem LDAP_END_DECL
412de962bdSlukem 
422de962bdSlukem #endif /* _GETOPT_COMPAT_H */
43