move the test to replace getopt higher up, before we need to include anything.

This commit is contained in:
christos 2007-11-06 19:13:16 +00:00
parent 3b271ff768
commit 9df03145fa
1 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: getopt_long.c,v 1.21 2007/07/05 16:05:40 ginsbach Exp $ */
/* $NetBSD: getopt_long.c,v 1.22 2007/11/06 19:13:16 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -33,9 +33,14 @@
#include "nbtool_config.h"
#endif
#if HAVE_NBTOOL_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND
#define REPLACE_GETOPT
#endif
#ifdef REPLACE_GETOPT
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: getopt_long.c,v 1.21 2007/07/05 16:05:40 ginsbach Exp $");
__RCSID("$NetBSD: getopt_long.c,v 1.22 2007/11/06 19:13:16 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@ -51,11 +56,6 @@ __RCSID("$NetBSD: getopt_long.c,v 1.21 2007/07/05 16:05:40 ginsbach Exp $");
#include <stdlib.h>
#include <string.h>
#if HAVE_NBTOOL_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND
#define REPLACE_GETOPT
#endif
#ifdef REPLACE_GETOPT
#ifdef __weak_alias
__weak_alias(getopt,_getopt)
#endif