You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2013/02/20 17:55:20 UTC
svn commit: r1448291 - in /qpid/proton/trunk: ./ examples/messenger/c/
proton-c/src/ proton-c/wincompat/ proton-c/wincompat/internal/
Author: cliffjansen
Date: Wed Feb 20 16:55:19 2013
New Revision: 1448291
URL: http://svn.apache.org/r1448291
Log:
PROTON-236 freegetopt compat for proton-c windows builds.
Added:
qpid/proton/trunk/proton-c/wincompat/
qpid/proton/trunk/proton-c/wincompat/getopt.h
qpid/proton/trunk/proton-c/wincompat/internal/
qpid/proton/trunk/proton-c/wincompat/internal/LICENSE
qpid/proton/trunk/proton-c/wincompat/internal/getopt.c
qpid/proton/trunk/proton-c/wincompat/internal/getopt.h
Modified:
qpid/proton/trunk/LICENSE
qpid/proton/trunk/README
qpid/proton/trunk/examples/messenger/c/recv.c
qpid/proton/trunk/examples/messenger/c/send.c
qpid/proton/trunk/proton-c/src/proton.c
qpid/proton/trunk/proton-c/src/util.h
Modified: qpid/proton/trunk/LICENSE
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/LICENSE?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/LICENSE (original)
+++ qpid/proton/trunk/LICENSE Wed Feb 20 16:55:19 2013
@@ -201,3 +201,9 @@
See the License for the specific language governing permissions and
limitations under the License.
+
+PROTON SUBCOMPONENTS:
+
+Proton includes freegetopt with a separate BSD license. Your use
+of the source code for freegetopt is subject to the terms and
+conditions of its license in proton-c/wincompat/internal/LICENSE.
Modified: qpid/proton/trunk/README
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/README?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/README (original)
+++ qpid/proton/trunk/README Wed Feb 20 16:55:19 2013
@@ -76,56 +76,73 @@ file.
== Build Instructions (Windows) ==
This describes how to build the Proton library on Windows using Microsoft
-Visual C++ 2010 Express (VC10).
+Visual C++.
The Proton build uses the cmake tool to generate the Visual Studio project
-files. These project files can then be loaded into Express and used to build
-the Proton library.
+files. These project files can then be loaded into Visual Studio and used to
+build the Proton library.
-Note that these instructions were created using a 32 bit version of Windows 7
-Professional. These instructions assume use of a command shell.
+These instructions assume use of a command shell. If you use the Visual
+Studio supplied Command Prompt, cmake is even more likely to guess the
+intended compiler.
The following packages must be installed:
- Visual Studio 2010 Express (or equivalent)
+ Visual Studio 2005 or newer (regular or C++ Express)
Python (www.python.org)
Cmake (www.cmake.org)
+Optional: to run the python or java driven test suites
+
+ swig (www.swig.org)
+
Notes:
- - Be sure to install MSVC Express 2010 Service Pack 1 also!
+ - Be sure to install relevant Microsoft Service Packs and updates
- python.exe _must_ be in your path
- cmake.exe _must_ be in your path
+ - swig.exe optional (but should be in your path for building test modules)
-Step 1: Create a 'build' directory - this must be at the same level as the 'src'
- directory. Example:
+Step 1: Create a 'build' directory - this must be at the same level as the
+ 'proton-c' directory. Example:
- $ cd proton-c
- $ mkdir build
+ From the directory where you found this README file:
+ > mkdir build
Step 2: cd into the build directory
- $ cd build
+ > cd build
-Step 3: Generate the Visual Studio project files using cmake. You must provide:
+Step 3: Generate the Visual Studio project files using cmake. The command contains
- 1) the name of the compiler you are using [see cmake documentation],
- 2) the path to the _directory_ that contains the "CMakeLists.txt"
- file (the parent directory, in this case).
+ 1) the name of the compiler you are using (if cmake guesses wrongly)
+ 2) the path (required) to the _directory_ that contains the top level
+ "CMakeLists.txt" file (the parent directory, in this case).
Example:
- $ cmake -G "Visual Studio 10" ..
+ > cmake ..
+
+ If cmake doesn't guess things correctly, useful additional arguments are:
+
+ -G "Visual Studio 10"
+ -DSWIG_EXECUTABLE=C:\swigwin-2.0.7\swig.exe
Refer to the cmake documentation for more information.
-Step 4: Load the ALL_BUILD project into Visual C++ Express.
+Step 4: Load the ALL_BUILD project into Visual Studio
- 4a: Run the Microsoft Visual C++ Express IDE
- 4b: From within the IDE, open the ALL_BUILD project file - it should be in
- the 'build' directory you created above.
+ 4a: Run the Microsoft Visual Studio IDE
+ 4b: From within the IDE, open the ALL_BUILD project file or proton solution
+ file - it should be in the 'build' directory you created above.
+ 4c: select the appropriate configuration. RelWithDebInfo works best with
+ the included CMake/CTest scripts
Step 5: Build the ALL_BUILD project.
+Note that if you wish to build debug version of proton for use with swig
+bindings on Windows, you must have the appropriate debug target libraries to
+link against.
+
=== Proton-J ===
== Build Instructions (All platforms) ==
@@ -150,14 +167,13 @@ implementations.
== Test Instructions (Proton-C only) ==
-To run the system tests against Proton-C, from the directory where you found this
-README file:
+To run the system tests against Proton-C, from your build directory above:
- # Source conifig.sh to set-up the Python path.
- . config.sh
+ # to run all the tests, summary mode
+ ctest
- # Execute the tests
- ./tests/python/proton-test
+ # to run a single test, full output
+ ctest -V -R proton-c
== Test Instructions (Proton-J and Proton-C) ==
Modified: qpid/proton/trunk/examples/messenger/c/recv.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/recv.c?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/recv.c (original)
+++ qpid/proton/trunk/examples/messenger/c/recv.c Wed Feb 20 16:55:19 2013
@@ -21,7 +21,11 @@
#include "proton/message.h"
#include "proton/messenger.h"
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include "../../../proton-c/wincompat/getopt.h"
+#else
#include <getopt.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
Modified: qpid/proton/trunk/examples/messenger/c/send.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/send.c?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/send.c (original)
+++ qpid/proton/trunk/examples/messenger/c/send.c Wed Feb 20 16:55:19 2013
@@ -21,7 +21,11 @@
#include "proton/message.h"
#include "proton/messenger.h"
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include "../../../proton-c/wincompat/getopt.h"
+#else
#include <getopt.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Modified: qpid/proton/trunk/proton-c/src/proton.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/proton.c?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/proton.c (original)
+++ qpid/proton/trunk/proton-c/src/proton.c Wed Feb 20 16:55:19 2013
@@ -22,6 +22,10 @@
#if defined(_WIN32) && ! defined(__CYGWIN__)
#define NOGDI
#include <winsock2.h>
+#include "../wincompat/getopt.h"
+#else
+#include <unistd.h>
+#include <libgen.h>
#endif
#include <stdio.h>
@@ -29,8 +33,6 @@
#include <proton/driver.h>
#include <proton/message.h>
#include <proton/util.h>
-#include <unistd.h>
-#include <libgen.h>
#include "util.h"
#include "pn_config.h"
#include <proton/codec.h>
@@ -447,7 +449,7 @@ int main(int argc, char **argv)
buffer(argc, argv);
exit(EXIT_SUCCESS);
case 'h':
- printf("Usage: %s [-h] [-c [user[:password]@]host[:port]] [-a <address>] [-m <sasl-mech>]\n", basename(argv[0]));
+ printf("Usage: proton [-h] [-c [user[:password]@]host[:port]] [-a <address>] [-m <sasl-mech>]\n");
printf("\n");
printf(" -c The connect url.\n");
printf(" -a The AMQP address.\n");
Modified: qpid/proton/trunk/proton-c/src/util.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/util.h?rev=1448291&r1=1448290&r2=1448291&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/util.h (original)
+++ qpid/proton/trunk/proton-c/src/util.h Wed Feb 20 16:55:19 2013
@@ -32,9 +32,9 @@
#include <sys/types.h>
#include <proton/types.h>
-ssize_t pn_quote_data(char *dst, size_t capacity, const char *src, size_t size);
-void pn_fprint_data(FILE *stream, const char *bytes, size_t size);
-void pn_print_data(const char *bytes, size_t size);
+PN_EXTERN ssize_t pn_quote_data(char *dst, size_t capacity, const char *src, size_t size);
+PN_EXTERN void pn_fprint_data(FILE *stream, const char *bytes, size_t size);
+PN_EXTERN void pn_print_data(const char *bytes, size_t size);
bool pn_env_bool(const char *name);
pn_timestamp_t pn_timestamp_min(pn_timestamp_t a, pn_timestamp_t b);
Added: qpid/proton/trunk/proton-c/wincompat/getopt.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/wincompat/getopt.h?rev=1448291&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/wincompat/getopt.h (added)
+++ qpid/proton/trunk/proton-c/wincompat/getopt.h Wed Feb 20 16:55:19 2013
@@ -0,0 +1,39 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+/*
+ * Provides an embedded getopt implementation to the C file including
+ * this. Only intended for use by Proton examples and test/debug
+ * programs to run on Windows.
+ *
+ * This file and any internal support files may change or be removed
+ * at any time.
+ */
+
+#if defined(qpid_proton_EXPORTS)
+#error This include file is not for use in the main proton library
+#endif
+
+#if !defined(_WIN32) || defined (__CYGWIN__)
+#error This include file only intended for Windows compatibility.
+#endif
+
+#include "internal/getopt.c"
Added: qpid/proton/trunk/proton-c/wincompat/internal/LICENSE
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/wincompat/internal/LICENSE?rev=1448291&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/wincompat/internal/LICENSE (added)
+++ qpid/proton/trunk/proton-c/wincompat/internal/LICENSE Wed Feb 20 16:55:19 2013
@@ -0,0 +1,33 @@
+Free Getopt
+Copyright (c)2002-2003 Mark K. Kim
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the original author of this software nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
Added: qpid/proton/trunk/proton-c/wincompat/internal/getopt.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/wincompat/internal/getopt.c?rev=1448291&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/wincompat/internal/getopt.c (added)
+++ qpid/proton/trunk/proton-c/wincompat/internal/getopt.c Wed Feb 20 16:55:19 2013
@@ -0,0 +1,250 @@
+/*****************************************************************************
+* getopt.c - competent and free getopt library.
+* $Header: /cvsroot/freegetopt/freegetopt/getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $
+*
+* Copyright (c)2002-2003 Mark K. Kim
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+*
+* * Neither the original author of this software nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "getopt.h"
+
+
+static const char* ID = "$Id: getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $";
+
+
+char* optarg = NULL;
+int optind = 0;
+int opterr = 1;
+int optopt = '?';
+
+
+static char** prev_argv = NULL; /* Keep a copy of argv and argc to */
+static int prev_argc = 0; /* tell if getopt params change */
+static int argv_index = 0; /* Option we're checking */
+static int argv_index2 = 0; /* Option argument we're checking */
+static int opt_offset = 0; /* Index into compounded "-option" */
+static int dashdash = 0; /* True if "--" option reached */
+static int nonopt = 0; /* How many nonopts we've found */
+
+static void increment_index()
+{
+ /* Move onto the next option */
+ if(argv_index < argv_index2)
+ {
+ while(prev_argv[++argv_index] && prev_argv[argv_index][0] != '-'
+ && argv_index < argv_index2+1);
+ }
+ else argv_index++;
+ opt_offset = 1;
+}
+
+
+/*
+* Permutes argv[] so that the argument currently being processed is moved
+* to the end.
+*/
+static int permute_argv_once()
+{
+ /* Movability check */
+ if(argv_index + nonopt >= prev_argc) return 1;
+ /* Move the current option to the end, bring the others to front */
+ else
+ {
+ char* tmp = prev_argv[argv_index];
+
+ /* Move the data */
+ memmove(&prev_argv[argv_index], &prev_argv[argv_index+1],
+ sizeof(char**) * (prev_argc - argv_index - 1));
+ prev_argv[prev_argc - 1] = tmp;
+
+ nonopt++;
+ return 0;
+ }
+}
+
+
+int getopt(int argc, char** argv, char* optstr)
+{
+ int c = 0;
+
+ /* If we have new argv, reinitialize */
+ if(prev_argv != argv || prev_argc != argc)
+ {
+ /* Initialize variables */
+ prev_argv = argv;
+ prev_argc = argc;
+ argv_index = 1;
+ argv_index2 = 1;
+ opt_offset = 1;
+ dashdash = 0;
+ nonopt = 0;
+ }
+
+ /* Jump point in case we want to ignore the current argv_index */
+ getopt_top:
+
+ /* Misc. initializations */
+ optarg = NULL;
+
+ /* Dash-dash check */
+ if(argv[argv_index] && !strcmp(argv[argv_index], "--"))
+ {
+ dashdash = 1;
+ increment_index();
+ }
+
+ /* If we're at the end of argv, that's it. */
+ if(argv[argv_index] == NULL)
+ {
+ c = -1;
+ }
+ /* Are we looking at a string? Single dash is also a string */
+ else if(dashdash || argv[argv_index][0] != '-' || !strcmp(argv[argv_index], "-"))
+ {
+ /* If we want a string... */
+ if(optstr[0] == '-')
+ {
+ c = 1;
+ optarg = argv[argv_index];
+ increment_index();
+ }
+ /* If we really don't want it (we're in POSIX mode), we're done */
+ else if(optstr[0] == '+' || getenv("POSIXLY_CORRECT"))
+ {
+ c = -1;
+
+ /* Everything else is a non-opt argument */
+ nonopt = argc - argv_index;
+ }
+ /* If we mildly don't want it, then move it back */
+ else
+ {
+ if(!permute_argv_once()) goto getopt_top;
+ else c = -1;
+ }
+ }
+ /* Otherwise we're looking at an option */
+ else
+ {
+ char* opt_ptr = NULL;
+
+ /* Grab the option */
+ c = argv[argv_index][opt_offset++];
+
+ /* Is the option in the optstr? */
+ if(optstr[0] == '-') opt_ptr = strchr(optstr+1, c);
+ else opt_ptr = strchr(optstr, c);
+ /* Invalid argument */
+ if(!opt_ptr)
+ {
+ if(opterr)
+ {
+ fprintf(stderr, "%s: invalid option -- %c\n", argv[0], c);
+ }
+
+ optopt = c;
+ c = '?';
+
+ /* Move onto the next option */
+ increment_index();
+ }
+ /* Option takes argument */
+ else if(opt_ptr[1] == ':')
+ {
+ /* ie, -oARGUMENT, -xxxoARGUMENT, etc. */
+ if(argv[argv_index][opt_offset] != '\0')
+ {
+ optarg = &argv[argv_index][opt_offset];
+ increment_index();
+ }
+ /* ie, -o ARGUMENT (only if it's a required argument) */
+ else if(opt_ptr[2] != ':')
+ {
+ /* One of those "you're not expected to understand this" moment */
+ if(argv_index2 < argv_index) argv_index2 = argv_index;
+ while(argv[++argv_index2] && argv[argv_index2][0] == '-');
+ optarg = argv[argv_index2];
+
+ /* Don't cross into the non-option argument list */
+ if(argv_index2 + nonopt >= prev_argc) optarg = NULL;
+
+ /* Move onto the next option */
+ increment_index();
+ }
+ else
+ {
+ /* Move onto the next option */
+ increment_index();
+ }
+
+ /* In case we got no argument for an option with required argument */
+ if(optarg == NULL && opt_ptr[2] != ':')
+ {
+ optopt = c;
+ c = '?';
+
+ if(opterr)
+ {
+ fprintf(stderr,"%s: option requires an argument -- %c\n",
+ argv[0], optopt);
+ }
+ }
+ }
+ /* Option does not take argument */
+ else
+ {
+ /* Next argv_index */
+ if(argv[argv_index][opt_offset] == '\0')
+ {
+ increment_index();
+ }
+ }
+ }
+
+ /* Calculate optind */
+ if(c == -1)
+ {
+ optind = argc - nonopt;
+ }
+ else
+ {
+ optind = argv_index;
+ }
+
+ return c;
+}
+
+
+/* vim:ts=3
+*/
Added: qpid/proton/trunk/proton-c/wincompat/internal/getopt.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/wincompat/internal/getopt.h?rev=1448291&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/wincompat/internal/getopt.h (added)
+++ qpid/proton/trunk/proton-c/wincompat/internal/getopt.h Wed Feb 20 16:55:19 2013
@@ -0,0 +1,63 @@
+/*****************************************************************************
+* getopt.h - competent and free getopt library.
+* $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $
+*
+* Copyright (c)2002-2003 Mark K. Kim
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+*
+* * Neither the original author of this software nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+* DAMAGE.
+*/
+#ifndef GETOPT_H_
+#define GETOPT_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern char* optarg;
+extern int optind;
+extern int opterr;
+extern int optopt;
+
+int getopt(int argc, char** argv, char* optstr);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* GETOPT_H_ */
+
+
+/* vim:ts=3
+*/
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org