From: compudj Date: Thu, 1 Dec 2005 20:41:06 +0000 (+0000) Subject: deal with LTT_ALIGN (packed mode) X-Git-Tag: v0.12.20~2135 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d428224cad4b5c21a9d28d3bd174f1a6097051fa;p=lttv.git deal with LTT_ALIGN (packed mode) git-svn-id: http://ltt.polymtl.ca/svn@1354 04897980-b3bd-0310-b5e0-8ef037075253 --- 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: