1/* getopt-compat.h -- getopt(3) compatibility header */
2/* $OpenLDAP$ */
3/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 *
5 * Copyright 1998-2011 The OpenLDAP Foundation.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
10 * Public License.
11 *
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>.
15 */
16
17/*
18 * getopt(3) declarations
19 */
20#ifndef _GETOPT_COMPAT_H
21#define _GETOPT_COMPAT_H
22
23#include <ldap_cdefs.h>
24
25LDAP_BEGIN_DECL
26
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
33
34LDAP_LUTIL_V (char *) optarg;
35LDAP_LUTIL_V (int) optind, opterr, optopt;
36LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *));
37
38LDAP_END_DECL
39
40#endif /* _GETOPT_COMPAT_H */
41