Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
b9b8b959
Commit
b9b8b959
authored
Mar 05, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-fno-include-deps
parent
01633091
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
12 deletions
+24
-12
ChangeLog
ChangeLog
+4
-2
asn1c/asn1c.c
asn1c/asn1c.c
+3
-0
libasn1compiler/asn1c_save.c
libasn1compiler/asn1c_save.c
+13
-10
libasn1compiler/asn1compiler.h
libasn1compiler/asn1compiler.h
+4
-0
No files found.
ChangeLog
View file @
b9b8b959
...
@@ -3,11 +3,13 @@
...
@@ -3,11 +3,13 @@
* Released -fcompound-names to fix the name clashes in the code
* Released -fcompound-names to fix the name clashes in the code
produced by the asn1c.
produced by the asn1c.
* Released -fno-include-deps to avoid #including non-critical
external dependencies.
* Compiler is taught to produce compilable code for yet another class
of circular ASN.1 type references.
* X.693:8.3.4 prohibits anything but SignedNumber; fixed XER codec.
* X.693:8.3.4 prohibits anything but SignedNumber; fixed XER codec.
* Fixed ENUMERATED identifier to value conversion in XER.
* Fixed ENUMERATED identifier to value conversion in XER.
Reported by <jacque.celaire@caramail.com>.
Reported by <jacque.celaire@caramail.com>.
* Compiler is taught to produce compilable code for yet another class
of circular ASN.1 type references.
* If the compiled file contents are the same as in already existing
* If the compiled file contents are the same as in already existing
file (left from previous compilation), the old file is retained.
file (left from previous compilation), the old file is retained.
This prevents thrashing `make` dependencies if amount of changes in
This prevents thrashing `make` dependencies if amount of changes in
...
...
asn1c/asn1c.c
View file @
b9b8b959
...
@@ -87,6 +87,8 @@ main(int ac, char **av) {
...
@@ -87,6 +87,8 @@ main(int ac, char **av) {
asn1_compiler_flags
|=
A1C_USE_NATIVE_TYPES
;
asn1_compiler_flags
|=
A1C_USE_NATIVE_TYPES
;
}
else
if
(
strcmp
(
optarg
,
"no-constraints"
)
==
0
)
{
}
else
if
(
strcmp
(
optarg
,
"no-constraints"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_NO_CONSTRAINTS
;
asn1_compiler_flags
|=
A1C_NO_CONSTRAINTS
;
}
else
if
(
strcmp
(
optarg
,
"no-include-deps"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_NO_INCLUDE_DEPS
;
}
else
if
(
strcmp
(
optarg
,
"unnamed-unions"
)
==
0
)
{
}
else
if
(
strcmp
(
optarg
,
"unnamed-unions"
)
==
0
)
{
asn1_compiler_flags
|=
A1C_UNNAMED_UNIONS
;
asn1_compiler_flags
|=
A1C_UNNAMED_UNIONS
;
}
else
if
(
strcmp
(
optarg
,
"types88"
)
==
0
)
{
}
else
if
(
strcmp
(
optarg
,
"types88"
)
==
0
)
{
...
@@ -313,6 +315,7 @@ usage(const char *av0) {
...
@@ -313,6 +315,7 @@ usage(const char *av0) {
" -fknown-extern-type=<name> Pretend this type is known
\n
"
" -fknown-extern-type=<name> Pretend this type is known
\n
"
" -fnative-types Use
\"
long
\"
instead of INTEGER_t whenever possible, etc.
\n
"
" -fnative-types Use
\"
long
\"
instead of INTEGER_t whenever possible, etc.
\n
"
" -fno-constraints Do not generate constraint checking code
\n
"
" -fno-constraints Do not generate constraint checking code
\n
"
" -fno-include-deps Do not generate courtesy #includes for dependencies
\n
"
" -funnamed-unions Enable unnamed unions in structures
\n
"
" -funnamed-unions Enable unnamed unions in structures
\n
"
" -ftypes88 Pretend to support only ASN.1:1988 embedded types
\n
"
" -ftypes88 Pretend to support only ASN.1:1988 embedded types
\n
"
"
\n
"
"
\n
"
...
...
libasn1compiler/asn1c_save.c
View file @
b9b8b959
...
@@ -224,21 +224,22 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
...
@@ -224,21 +224,22 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
fprintf
(
fp_h
,
"#include <asn_application.h>
\n
"
);
fprintf
(
fp_h
,
"#include <asn_application.h>
\n
"
);
#define SAVE_STREAM(
idx, msg, actdep) do {
\
#define SAVE_STREAM(
fp, idx, msg, actdep) do {
\
if(TQ_FIRST(&(cs->destination[idx].chunks))
)
\
if(TQ_FIRST(&(cs->destination[idx].chunks))
&& msg)
\
fprintf(fp
_h
, "\n
/* %s */
\n", msg); \
fprintf(fp, "\n
/* %s */
\n", msg); \
TQ_FOR(ot, &(cs->destination[idx].chunks), next) { \
TQ_FOR(ot, &(cs->destination[idx].chunks), next) { \
if(actdep) asn1c_activate_dependency(deps, 0, ot->buf); \
if(actdep) asn1c_activate_dependency(deps, 0, ot->buf); \
fwrite(ot->buf, ot->len, 1, fp
_h
); \
fwrite(ot->buf, ot->len, 1, fp); \
} \
} \
} while(0)
} while(0)
SAVE_STREAM
(
OT_INCLUDES
,
"Including external dependencies"
,
1
);
SAVE_STREAM
(
fp_h
,
OT_INCLUDES
,
"Including external dependencies"
,
1
);
SAVE_STREAM
(
OT_DEPS
,
"Dependencies"
,
0
);
SAVE_STREAM
(
fp_h
,
OT_DEPS
,
"Dependencies"
,
0
);
SAVE_STREAM
(
OT_FWD_DECLS
,
"Forward declarations"
,
0
);
SAVE_STREAM
(
fp_h
,
OT_FWD_DECLS
,
"Forward declarations"
,
0
);
SAVE_STREAM
(
OT_TYPE_DECLS
,
expr
->
Identifier
,
0
);
SAVE_STREAM
(
fp_h
,
OT_TYPE_DECLS
,
expr
->
Identifier
,
0
);
SAVE_STREAM
(
OT_FUNC_DECLS
,
"Implementation"
,
0
);
SAVE_STREAM
(
fp_h
,
OT_FUNC_DECLS
,
"Implementation"
,
0
);
SAVE_STREAM
(
OT_POST_INCLUDE
,
"Referred external types"
,
1
);
if
(
!
(
arg
->
flags
&
A1C_NO_INCLUDE_DEPS
))
SAVE_STREAM
(
fp_h
,
OT_POST_INCLUDE
,
"Referred external types"
,
1
);
fprintf
(
fp_h
,
"
\n
#ifdef __cplusplus
\n
}
\n
#endif
\n\n
"
fprintf
(
fp_h
,
"
\n
#ifdef __cplusplus
\n
}
\n
#endif
\n\n
"
"#endif
\t
/* _%s_H_ */
\n
"
,
"#endif
\t
/* _%s_H_ */
\n
"
,
...
@@ -246,6 +247,8 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
...
@@ -246,6 +247,8 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) {
fprintf
(
fp_c
,
"#include <asn_internal.h>
\n\n
"
);
fprintf
(
fp_c
,
"#include <asn_internal.h>
\n\n
"
);
fprintf
(
fp_c
,
"#include <%s.h>
\n\n
"
,
expr
->
Identifier
);
/* Myself */
fprintf
(
fp_c
,
"#include <%s.h>
\n\n
"
,
expr
->
Identifier
);
/* Myself */
if
(
arg
->
flags
&
A1C_NO_INCLUDE_DEPS
)
SAVE_STREAM
(
fp_c
,
OT_POST_INCLUDE
,
0
,
1
);
TQ_FOR
(
ot
,
&
(
cs
->
destination
[
OT_CTABLES
].
chunks
),
next
)
TQ_FOR
(
ot
,
&
(
cs
->
destination
[
OT_CTABLES
].
chunks
),
next
)
fwrite
(
ot
->
buf
,
ot
->
len
,
1
,
fp_c
);
fwrite
(
ot
->
buf
,
ot
->
len
,
1
,
fp_c
);
TQ_FOR
(
ot
,
&
(
cs
->
destination
[
OT_CODE
].
chunks
),
next
)
TQ_FOR
(
ot
,
&
(
cs
->
destination
[
OT_CODE
].
chunks
),
next
)
...
...
libasn1compiler/asn1compiler.h
View file @
b9b8b959
...
@@ -43,6 +43,10 @@ enum asn1c_flags {
...
@@ -43,6 +43,10 @@ enum asn1c_flags {
* Generate type_id_PR_member things identifiers of id_PR_member.
* Generate type_id_PR_member things identifiers of id_PR_member.
*/
*/
A1C_COMPOUND_NAMES
=
0x0100
,
A1C_COMPOUND_NAMES
=
0x0100
,
/*
* Do not generate courtesy #includes for external dependencies.
*/
A1C_NO_INCLUDE_DEPS
=
0x0200
,
};
};
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment