asn1: use roken for generated source files
roken ensures the correct headers are used for each platform, ensures availability of non-portable constants (e.g. ENOTSUP), and on Windows enforces a consistent source for memory management. Change-Id: I31aa2935d0af9f3d9529166679d9eff35ccedfad
This commit is contained in:

committed by
Jeffrey Altman

parent
26df35d5f0
commit
e27e056b45
@@ -177,9 +177,9 @@ init_generate (const char *filename, const char *base)
|
|||||||
"#ifndef __%s_h__\n"
|
"#ifndef __%s_h__\n"
|
||||||
"#define __%s_h__\n\n", headerbase, headerbase);
|
"#define __%s_h__\n\n", headerbase, headerbase);
|
||||||
fprintf (headerfile,
|
fprintf (headerfile,
|
||||||
"#include <stddef.h>\n"
|
"#include <config.h>\n"
|
||||||
"#include <stdint.h>\n"
|
"#include <roken.h>\n"
|
||||||
"#include <time.h>\n\n");
|
"#include <stddef.h>\n");
|
||||||
fprintf (headerfile,
|
fprintf (headerfile,
|
||||||
"#ifndef __asn1_common_definitions__\n"
|
"#ifndef __asn1_common_definitions__\n"
|
||||||
"#define __asn1_common_definitions__\n\n");
|
"#define __asn1_common_definitions__\n\n");
|
||||||
@@ -307,12 +307,8 @@ init_generate (const char *filename, const char *base)
|
|||||||
fprintf (templatefile,
|
fprintf (templatefile,
|
||||||
"/* Generated from %s */\n"
|
"/* Generated from %s */\n"
|
||||||
"/* Do not edit */\n\n"
|
"/* Do not edit */\n\n"
|
||||||
"#include <stdio.h>\n"
|
"#include <config.h>\n"
|
||||||
"#include <stdlib.h>\n"
|
"#include <roken.h>\n"
|
||||||
"#include <time.h>\n"
|
|
||||||
"#include <string.h>\n"
|
|
||||||
"#include <errno.h>\n"
|
|
||||||
"#include <limits.h>\n"
|
|
||||||
"#include <asn1_err.h>\n"
|
"#include <asn1_err.h>\n"
|
||||||
"#include <%s>\n",
|
"#include <%s>\n",
|
||||||
filename,
|
filename,
|
||||||
@@ -411,12 +407,8 @@ generate_header_of_codefile(const char *name)
|
|||||||
"/* Generated from %s */\n"
|
"/* Generated from %s */\n"
|
||||||
"/* Do not edit */\n\n"
|
"/* Do not edit */\n\n"
|
||||||
"#define ASN1_LIB\n\n"
|
"#define ASN1_LIB\n\n"
|
||||||
"#include <stdio.h>\n"
|
"#include <config.h>\n"
|
||||||
"#include <stdlib.h>\n"
|
"#include <roken.h>\n"
|
||||||
"#include <time.h>\n"
|
|
||||||
"#include <string.h>\n"
|
|
||||||
"#include <errno.h>\n"
|
|
||||||
"#include <limits.h>\n"
|
|
||||||
"#include <%s>\n",
|
"#include <%s>\n",
|
||||||
orig_filename,
|
orig_filename,
|
||||||
type_file_string);
|
type_file_string);
|
||||||
|
Reference in New Issue
Block a user