remove -DHAVE_CONFIG_H, add --one-source-file, rename krb5 and cms to "better" file names
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24337 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -581,11 +581,11 @@ $(gen_files_test) test_asn1.h: test_asn1_files
|
||||
rfc2459_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc2459.asn1
|
||||
./asn1_compile$(EXEEXT) --preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints $(srcdir)/rfc2459.asn1 rfc2459_asn1 || (rm -f rfc2459_asn1_files ; exit 1)
|
||||
|
||||
cms_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/CMS.asn1
|
||||
./asn1_compile$(EXEEXT) --decode-dce-ber $(srcdir)/CMS.asn1 cms_asn1 || (rm -f cms_asn1_files ; exit 1)
|
||||
cms_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/cms.asn1
|
||||
./asn1_compile$(EXEEXT) --decode-dce-ber $(srcdir)/cms.asn1 cms_asn1 || (rm -f cms_asn1_files ; exit 1)
|
||||
|
||||
krb5_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/k5.asn1
|
||||
./asn1_compile$(EXEEXT) --encode-rfc1510-bit-string --sequence=KRB5SignedPathPrincipals --sequence=AuthorizationData --sequence=METHOD-DATA --sequence=ETYPE-INFO --sequence=ETYPE-INFO2 $(srcdir)/k5.asn1 krb5_asn1 || (rm -f krb5_asn1_files ; exit 1)
|
||||
krb5_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/krb5.asn1
|
||||
./asn1_compile$(EXEEXT) --encode-rfc1510-bit-string --sequence=KRB5SignedPathPrincipals --sequence=AuthorizationData --sequence=METHOD-DATA --sequence=ETYPE-INFO --sequence=ETYPE-INFO2 $(srcdir)/krb5.asn1 krb5_asn1 || (rm -f krb5_asn1_files ; exit 1)
|
||||
|
||||
pkinit_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkinit.asn1
|
||||
./asn1_compile$(EXEEXT) $(srcdir)/pkinit.asn1 pkinit_asn1 || (rm -f pkinit_asn1_files ; exit 1)
|
||||
@@ -609,11 +609,11 @@ test_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/test.asn1
|
||||
./asn1_compile$(EXEEXT) --sequence=TESTSeqOf $(srcdir)/test.asn1 test_asn1 || (rm -f test_asn1_files ; exit 1)
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMS.asn1 \
|
||||
cms.asn1 \
|
||||
asn1_err.et \
|
||||
canthandle.asn1 \
|
||||
digest.asn1 \
|
||||
k5.asn1 \
|
||||
krb5.asn1 \
|
||||
kx509.asn1 \
|
||||
pkcs12.asn1 \
|
||||
pkcs8.asn1 \
|
||||
|
@@ -33,8 +33,6 @@
|
||||
|
||||
#include "der_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#include <version.h>
|
||||
|
||||
/*
|
||||
|
@@ -36,9 +36,9 @@
|
||||
#ifndef __DER_LOCL_H__
|
||||
#define __DER_LOCL_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -229,7 +229,7 @@ gen_compare_defval(const char *var, struct value *val)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
generate_header_of_codefile(const char *name)
|
||||
{
|
||||
char *filename;
|
||||
@@ -267,7 +267,7 @@ generate_header_of_codefile(const char *name)
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
close_codefile(void)
|
||||
{
|
||||
if (codefile == NULL)
|
||||
@@ -296,7 +296,8 @@ generate_constant (const Symbol *s)
|
||||
struct objid *o, **list;
|
||||
unsigned int i, len;
|
||||
|
||||
generate_header_of_codefile(s->gen_name);
|
||||
if (!one_code_file)
|
||||
generate_header_of_codefile(s->gen_name);
|
||||
|
||||
len = 0;
|
||||
for (o = s->value->u.objectidentifiervalue; o != NULL; o = o->next)
|
||||
@@ -342,7 +343,8 @@ generate_constant (const Symbol *s)
|
||||
|
||||
free(list);
|
||||
|
||||
close_codefile();
|
||||
if (!one_code_file)
|
||||
close_codefile();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -789,7 +791,8 @@ generate_type_header (const Symbol *s)
|
||||
void
|
||||
generate_type (const Symbol *s)
|
||||
{
|
||||
generate_header_of_codefile(s->gen_name);
|
||||
if (!one_code_file)
|
||||
generate_header_of_codefile(s->gen_name);
|
||||
|
||||
generate_type_header (s);
|
||||
generate_type_encode (s);
|
||||
@@ -800,5 +803,9 @@ generate_type (const Symbol *s)
|
||||
generate_type_seq (s);
|
||||
generate_glue (s->type, s->gen_name);
|
||||
fprintf(headerfile, "\n\n");
|
||||
close_codefile();
|
||||
|
||||
if (!one_code_file) {
|
||||
fprintf(codefile, "\n\n");
|
||||
close_codefile();
|
||||
}
|
||||
}
|
||||
|
@@ -36,9 +36,8 @@
|
||||
#ifndef __GEN_LOCL_H__
|
||||
#define __GEN_LOCL_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -80,9 +79,14 @@ int yyparse(void);
|
||||
int preserve_type(const char *);
|
||||
int seq_type(const char *);
|
||||
|
||||
void generate_header_of_codefile(const char *);
|
||||
void close_codefile(void);
|
||||
|
||||
|
||||
extern FILE *headerfile, *codefile, *logfile;
|
||||
extern int dce_fix;
|
||||
extern int rfc1510_bitstring;
|
||||
extern int one_code_file;
|
||||
|
||||
extern int error_flag;
|
||||
|
||||
|
@@ -64,6 +64,7 @@ seq_type(const char *p)
|
||||
|
||||
int dce_fix;
|
||||
int rfc1510_bitstring;
|
||||
int one_code_file;
|
||||
int version_flag;
|
||||
int help_flag;
|
||||
struct getargs args[] = {
|
||||
@@ -71,6 +72,7 @@ struct getargs args[] = {
|
||||
{ "decode-dce-ber", 0, arg_flag, &dce_fix },
|
||||
{ "preserve-binary", 0, arg_strings, &preserve },
|
||||
{ "sequence", 0, arg_strings, &seq },
|
||||
{ "one-code-file", 0, arg_flag, &one_code_file },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
};
|
||||
@@ -122,6 +124,10 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
init_generate (file, name);
|
||||
|
||||
if (one_code_file)
|
||||
generate_header_of_codefile(name);
|
||||
|
||||
initsym ();
|
||||
ret = yyparse ();
|
||||
if(ret != 0 || error_flag != 0)
|
||||
@@ -129,5 +135,9 @@ main(int argc, char **argv)
|
||||
close_generate ();
|
||||
if (argc != optidx)
|
||||
fclose(yyin);
|
||||
|
||||
if (one_code_file)
|
||||
close_codefile();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -34,9 +34,9 @@
|
||||
/* $Id$ */
|
||||
|
||||
%{
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
Reference in New Issue
Block a user