1 /* getopt-compat.h -- getopt(3) compatibility header */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2017 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
18 * getopt(3) declarations
20 #ifndef _GETOPT_COMPAT_H
21 #define _GETOPT_COMPAT_H
23 #include <ldap_cdefs.h>
27 /* change symbols to avoid clashing */
28 #define optarg lutil_optarg
29 #define optind lutil_optind
30 #define opterr lutil_opterr
31 #define optopt lutil_optopt
32 #define getopt lutil_getopt
34 LDAP_LUTIL_V (char *) optarg;
35 LDAP_LUTIL_V (int) optind, opterr, optopt;
36 LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *));
40 #endif /* _GETOPT_COMPAT_H */