Back to index

openldap  2.4.31
getopt-compat.h
Go to the documentation of this file.
00001 /* getopt-compat.h -- getopt(3) compatibility header */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 1998-2012 The OpenLDAP Foundation.
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted only as authorized by the OpenLDAP
00010  * Public License.
00011  *
00012  * A copy of this license is available in file LICENSE in the
00013  * top-level directory of the distribution or, alternatively, at
00014  * <http://www.OpenLDAP.org/license.html>.
00015  */
00016 
00017 /*
00018  * getopt(3) declarations
00019  */
00020 #ifndef _GETOPT_COMPAT_H
00021 #define _GETOPT_COMPAT_H
00022 
00023 #include <ldap_cdefs.h>
00024 
00025 LDAP_BEGIN_DECL
00026 
00027 /* change symbols to avoid clashing */
00028 #define optarg lutil_optarg
00029 #define optind lutil_optind
00030 #define opterr lutil_opterr
00031 #define optopt lutil_optopt
00032 #define getopt lutil_getopt
00033 
00034 LDAP_LUTIL_V (char *) optarg;
00035 LDAP_LUTIL_V (int) optind, opterr, optopt;
00036 LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *));
00037 
00038 LDAP_END_DECL
00039 
00040 #endif /* _GETOPT_COMPAT_H */