From: Aleš Křenek Date: Mon, 30 Jul 2007 17:26:10 +0000 (+0000) Subject: implemented padding inside JobStatus X-Git-Tag: glite-lb-build_R_1_6_0_1~18 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=4dca83e2cdb515ad010f44fe859454b1ef18b7d7;p=jra1mw.git implemented padding inside JobStatus --- 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++; + } } @@@}