1 /* $NetBSD: getopt-compat.h,v 1.1.1.3 2010/12/12 15:21:22 adam Exp $ */ 2 3 /* getopt-compat.h -- getopt(3) compatibility header */ 4 /* OpenLDAP: pkg/ldap/include/getopt-compat.h,v 1.19.2.5 2010/04/13 20:22:47 kurt Exp */ 5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>. 6 * 7 * Copyright 1998-2010 The OpenLDAP Foundation. 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted only as authorized by the OpenLDAP 12 * Public License. 13 * 14 * A copy of this license is available in file LICENSE in the 15 * top-level directory of the distribution or, alternatively, at 16 * <http://www.OpenLDAP.org/license.html>. 17 */ 18 19 /* 20 * getopt(3) declarations 21 */ 22 #ifndef _GETOPT_COMPAT_H 23 #define _GETOPT_COMPAT_H 24 25 #include <ldap_cdefs.h> 26 27 LDAP_BEGIN_DECL 28 29 /* change symbols to avoid clashing */ 30 #define optarg lutil_optarg 31 #define optind lutil_optind 32 #define opterr lutil_opterr 33 #define optopt lutil_optopt 34 #define getopt lutil_getopt 35 36 LDAP_LUTIL_V (char *) optarg; 37 LDAP_LUTIL_V (int) optind, opterr, optopt; 38 LDAP_LUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *)); 39 40 LDAP_END_DECL 41 42 #endif /* _GETOPT_COMPAT_H */ 43