From 4dca83e2cdb515ad010f44fe859454b1ef18b7d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Mon, 30 Jul 2007 17:26:10 +0000 Subject: [PATCH] implemented padding inside JobStatus --- .../interface/jobstat.h.T | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/org.glite.lb.client-interface/interface/jobstat.h.T b/org.glite.lb.client-interface/interface/jobstat.h.T index 60ca35a..6115cdb 100644 --- a/org.glite.lb.client-interface/interface/jobstat.h.T +++ b/org.glite.lb.client-interface/interface/jobstat.h.T @@ -89,9 +89,30 @@ typedef struct _edg_wll_TagValue { * Description of the job status. * Returned by the edg_wll_JobStatus() function */ + +@@@{ + my $padno = 0; + my $padstruct = 'edg_wll_JobStatCode state;'; # XXX + + for my $n (getAllFieldsOrdered $status) { + selectField $status $n; + my $f = getField $status; + my $type = getType $f; + my $name = getName $f; + + $padstruct .= "$type $name; "; + if ($f->{pad}) { + gen "struct _pad_JobStatus_${padno}_dont_use { $padstruct };\n"; + $padno++; + $padstruct = ''; + } + } +@@@} + typedef struct _edg_wll_JobStat { edg_wll_JobStatCode state; /**< status code */ @@@{ + $padno = 0; for my $n (getAllFieldsOrdered $status) { selectField $status $n; my $f = getField $status; @@ -103,6 +124,11 @@ typedef struct _edg_wll_JobStat { gen qq{ ! $type $name; /**< $comment */ }; + if ($f->{pad}) { + my $pad = $f->{pad}; + gen "\n char _pad_${padno}[sizeof(void *) * $pad - sizeof(stuct _pad_JobStatus_${padno}_dont_use)];\n\n"; + $padno++; + } } @@@} -- 1.8.2.3