Added getopt_long and getlogin capability to the Windows build.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@90 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
parent
cf65f6ef5d
commit
8c5f6ee069
31
Makefile.am
31
Makefile.am
@ -1,24 +1,27 @@
|
||||
SUBDIRS = fko src doc
|
||||
|
||||
EXTRA_DIST = \
|
||||
perl/FKO/README \
|
||||
perl/FKO/inc/Devel/CheckLib.pm \
|
||||
perl/FKO/MANIFEST \
|
||||
perl/FKO/ppport.h \
|
||||
perl/FKO/FKO.xs \
|
||||
perl/FKO/t/03_errors.t \
|
||||
perl/FKO/t/02_functions.t \
|
||||
perl/FKO/t/01_constants.t \
|
||||
perl/FKO/t/00_init.t \
|
||||
perl/FKO/Makefile.PL \
|
||||
perl/FKO/typemap \
|
||||
perl/FKO/lib/FKO.pm \
|
||||
perl/FKO/lib/FKO_Constants.pl \
|
||||
perl/FKO/Changes \
|
||||
perl/FKO/README \
|
||||
perl/FKO/inc/Devel/CheckLib.pm \
|
||||
perl/FKO/MANIFEST \
|
||||
perl/FKO/ppport.h \
|
||||
perl/FKO/FKO.xs \
|
||||
perl/FKO/t/03_errors.t \
|
||||
perl/FKO/t/02_functions.t \
|
||||
perl/FKO/t/01_constants.t \
|
||||
perl/FKO/t/00_init.t \
|
||||
perl/FKO/Makefile.PL \
|
||||
perl/FKO/typemap \
|
||||
perl/FKO/lib/FKO.pm \
|
||||
perl/FKO/lib/FKO_Constants.pl \
|
||||
perl/FKO/Changes \
|
||||
win32/config.h \
|
||||
win32/fwknop-client.vcproj \
|
||||
win32/getopt.c \
|
||||
win32/getopt1.c \
|
||||
win32/getopt.h \
|
||||
win32/getlogin.c \
|
||||
win32/getlogin.h \
|
||||
win32/libfko.sln \
|
||||
win32/libfko.vcproj
|
||||
|
||||
|
||||
24
fko/fko.h
24
fko/fko.h
@ -26,19 +26,19 @@
|
||||
#ifndef FKO_H
|
||||
#define FKO_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef DLL_EXPORTS
|
||||
#define DLL_API __declspec(dllexport)
|
||||
#else
|
||||
#ifdef DLL_IMPORTS
|
||||
#define DLL_API __declspec(dllimport)
|
||||
#else
|
||||
#define DLL_API
|
||||
#endif
|
||||
#ifdef DLL_EXPORTS
|
||||
#define DLL_API __declspec(dllexport)
|
||||
#else
|
||||
#ifdef DLL_IMPORTS
|
||||
#define DLL_API __declspec(dllimport)
|
||||
#else
|
||||
#define DLL_API
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define DLL_API
|
||||
@ -245,8 +245,8 @@ DLL_API int fko_get_gpg_signature_status(fko_ctx_t ctx, int *sigstat);
|
||||
DLL_API int fko_gpg_signature_id_match(fko_ctx_t ctx, const char *id, unsigned char *result);
|
||||
DLL_API int fko_gpg_signature_fpr_match(fko_ctx_t ctx, const char *fpr, unsigned char *result);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FKO_H */
|
||||
|
||||
@ -26,6 +26,10 @@
|
||||
#include "fko_common.h"
|
||||
#include "fko.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <getlogin.h>
|
||||
#endif
|
||||
|
||||
/* Get or Set the username for the fko context spa data.
|
||||
*/
|
||||
int
|
||||
@ -54,27 +58,24 @@ fko_set_username(fko_ctx_t ctx, const char *spoof_user)
|
||||
/* cuserid will return the effective user (i.e. su or setuid).
|
||||
*/
|
||||
username = cuserid(NULL);
|
||||
#elif WIN32
|
||||
username = strdup("NO_USER");
|
||||
#else
|
||||
username = getlogin();
|
||||
#endif
|
||||
|
||||
/* If we did not get a name using the above methods, try the
|
||||
* LOGNAME or USER environment variables. If none of those work,
|
||||
* then we bail with an error.
|
||||
* then we fallback to NO_USER.
|
||||
*/
|
||||
if(username == NULL)
|
||||
if((username = getenv("LOGNAME")) == NULL)
|
||||
if((username = getenv("USER")) == NULL)
|
||||
return(FKO_ERROR_USERNAME_UNKNOWN);
|
||||
username = strdup("NO_USER");
|
||||
}
|
||||
|
||||
/* --DSS XXX: Bail out for now. But consider just
|
||||
* truncating in the future...
|
||||
/* Truncate the username if it is too long.
|
||||
*/
|
||||
if(strlen(username) > MAX_SPA_USERNAME_SIZE)
|
||||
return(FKO_ERROR_DATA_TOO_LARGE);
|
||||
*(username + MAX_SPA_USERNAME_SIZE) = '\0';
|
||||
|
||||
/* Just in case this is a subsquent call to this function. We
|
||||
* do not want to be leaking memory.
|
||||
|
||||
@ -36,6 +36,3 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif /* FKO_UTIL_H */
|
||||
|
||||
/***EOF***/
|
||||
|
||||
|
||||
/***EOF***/
|
||||
|
||||
@ -201,13 +201,9 @@ config_init(fko_cli_options_t *options, int argc, char **argv)
|
||||
options->proto = FKO_DEFAULT_PROTO;
|
||||
options->port = FKO_DEFAULT_PORT;
|
||||
|
||||
#ifdef WIN32
|
||||
while ((cmd_arg = getopt(argc, argv,
|
||||
"A:a:D:G:S:Q:m:p:P:B:bghqdTvVn")) != -1) {
|
||||
#else
|
||||
while ((cmd_arg = getopt_long(argc, argv,
|
||||
"A:a:D:G:S:Q:p:P:BbghqdTvVn", cmd_opts, &index)) != -1) {
|
||||
#endif
|
||||
|
||||
switch(cmd_arg) {
|
||||
case 'A':
|
||||
strlcpy(options->access_str, optarg, MAX_LINE_LEN);
|
||||
@ -374,12 +370,6 @@ usage(void)
|
||||
"\n"
|
||||
);
|
||||
|
||||
// --DSS TEMP
|
||||
#ifdef WIN32
|
||||
printf("NOTE: Long options and GPG encryption are not available\n");
|
||||
printf(" under Windows yet.\n\n");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -65,8 +65,8 @@
|
||||
#define MY_DESC "Single Packet Authorization client"
|
||||
|
||||
#define MAJOR_VER "1"
|
||||
#define MINOR_VER "10"
|
||||
#define MICRO_VER "0"
|
||||
#define MINOR_VER "9"
|
||||
#define MICRO_VER "12"
|
||||
#define MY_VERSION MAJOR_VER"."MINOR_VER"."MICRO_VER
|
||||
|
||||
/* Default config path, can override with -c
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/* $Id$
|
||||
*****************************************************************************
|
||||
*
|
||||
* File: fko_common.h
|
||||
* File: config.h
|
||||
*
|
||||
* Author: Damien S. Stuart
|
||||
*
|
||||
* Purpose: Common header for libfko source files.
|
||||
* Purpose: Common definition header for libfko source files (Windows build).
|
||||
*
|
||||
* Copyright (C) 2008 Damien Stuart (dstuart@dstuart.org)
|
||||
*
|
||||
|
||||
@ -173,6 +173,164 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug-static|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".;../fko;../src"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=" libfko.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)\fwknop.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(OutDir)"
|
||||
DelayLoadDLLs=""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release-static|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories=".;../fko;../src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=" libfko.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)\fwknop.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
@ -194,6 +352,10 @@
|
||||
RelativePath=".\getopt.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\getpasswd.c"
|
||||
>
|
||||
|
||||
41
win32/getlogin.c
Normal file
41
win32/getlogin.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
/* Return the login name of the user, or NULL if it can't be determined.
|
||||
The returned pointer, if not NULL, is good only until the next call. */
|
||||
|
||||
char *
|
||||
getlogin ()
|
||||
{
|
||||
static char user_name[MAX_PATH];
|
||||
DWORD length = MAX_PATH;
|
||||
|
||||
|
||||
if (GetUserNameA ((LPSTR)user_name, &length))
|
||||
return user_name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
35
win32/getlogin.h
Normal file
35
win32/getlogin.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* $Id$
|
||||
*****************************************************************************
|
||||
*
|
||||
* File: get_login.h
|
||||
*
|
||||
* Author: Damien S. Stuart
|
||||
*
|
||||
* Purpose: Header for getlogin.c
|
||||
*
|
||||
* Copyright (C) 2008 Damien Stuart (dstuart@dstuart.org)
|
||||
*
|
||||
* License (GNU Public License):
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
#ifndef GETLOGIN_H
|
||||
#define GETLOGIN_H 1
|
||||
|
||||
/* Function prototypes
|
||||
*/
|
||||
char* getlogin (void);
|
||||
|
||||
#endif /* GETLOGIN_H */
|
||||
|
||||
/***EOF***/
|
||||
2535
win32/getopt.c
2535
win32/getopt.c
File diff suppressed because it is too large
Load Diff
196
win32/getopt1.c
Normal file
196
win32/getopt1.c
Normal file
@ -0,0 +1,196 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <getopt.h>
|
||||
#else
|
||||
# include "getopt.h"
|
||||
#endif
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
#ifndef const
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#define GETOPT_INTERFACE_VERSION 2
|
||||
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||
but does match a short option, it is parsed as a short option
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
libc_hidden_def (getopt_long)
|
||||
libc_hidden_def (getopt_long_only)
|
||||
# endif
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"add", 1, 0, 0},
|
||||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 0, 0, 0},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
printf ("option %s", long_options[option_index].name);
|
||||
if (optarg)
|
||||
printf (" with arg %s", optarg);
|
||||
printf ("\n");
|
||||
break;
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
@ -11,17 +11,27 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug-static|Win32 = Debug-static|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Release-static|Win32 = Release-static|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Debug-static|Win32.Build.0 = Debug-static|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Release|Win32.Build.0 = Release|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Release-static|Win32.ActiveCfg = Release-static|Win32
|
||||
{133BC195-4877-481D-9F56-9F1BEBAD21F0}.Release-static|Win32.Build.0 = Release-static|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Debug-static|Win32.Build.0 = Debug-static|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Release|Win32.Build.0 = Release|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Release-static|Win32.ActiveCfg = Release-static|Win32
|
||||
{D8AFA02D-14BF-42F4-97DE-EF4924D046D6}.Release-static|Win32.Build.0 = Release-static|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -20,6 +20,149 @@
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="false"
|
||||
AdditionalIncludeDirectories=".;..\fko;..\src"
|
||||
PreprocessorDefinitions="DLL_EXPORTS;WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="0"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""C:\Documents and Settings\dstuart\My Documents\Visual Studio 2008\Projects\fwknop-c\win32""
|
||||
DelayLoadDLLs=""
|
||||
GenerateDebugInformation="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="false"
|
||||
AdditionalIncludeDirectories=".;..\fko;..\src"
|
||||
PreprocessorDefinitions="DLL_EXPORTS;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug-static|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
@ -82,7 +225,7 @@
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
Name="Release-static|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
@ -217,6 +360,10 @@
|
||||
RelativePath="..\fko\fko_user.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getlogin.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\fko\gpgme_funcs.c"
|
||||
>
|
||||
@ -291,6 +438,10 @@
|
||||
RelativePath="..\fko\fko_util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getlogin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\fko\gpgme_funcs.h"
|
||||
>
|
||||
@ -314,10 +465,6 @@
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user