From d428224cad4b5c21a9d28d3bd174f1a6097051fa Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 1 Dec 2005 20:41:06 +0000 Subject: [PATCH] deal with LTT_ALIGN (packed mode) git-svn-id: http://ltt.polymtl.ca/svn@1354 04897980-b3bd-0310-b5e0-8ef037075253 --- genevent-new/genevent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/genevent-new/genevent.c b/genevent-new/genevent.c index 006c902f..7f06edaa 100644 --- a/genevent-new/genevent.c +++ b/genevent-new/genevent.c @@ -456,7 +456,8 @@ int print_type_declaration(type_descriptor_t * td, FILE *fd, unsigned int tabs, if(print_type(((field_t*)td->fields.array[1])->type, fd, tabs, basename, "")) return 1; fprintf(fd, " *array;\n"); - fprintf(fd, "};\n"); + fprintf(fd, "};\n"); /* We do not LTT_ALIGN, because we never copy + it to the buffer directly. */ fprintf(fd, "\n"); break; @@ -481,11 +482,10 @@ int print_type_declaration(type_descriptor_t * td, FILE *fd, unsigned int tabs, fprintf(fd, "%s", field->name); fprintf(fd, ";\n"); } - fprintf(fd, "};\n"); + fprintf(fd, "} LTT_ALIGN;\n"); fprintf(fd, "\n"); break; case UNION: - /* TODO : Do not allow variable length fields in a union */ for(unsigned int i=0;ifields.position;i++){ field_t *field = (field_t*)(td->fields.array[i]); type_descriptor_t *type = field->type; @@ -506,7 +506,7 @@ int print_type_declaration(type_descriptor_t * td, FILE *fd, unsigned int tabs, fprintf(fd, "%s", field->name); fprintf(fd, ";\n"); } - fprintf(fd, "};\n"); + fprintf(fd, "} LTT_ALIGN;\n"); fprintf(fd, "\n"); break; default: -- 2.34.1