Make filebundling code work with gcc 4.5 and older.
This commit is contained in:
parent
86b1a3afc5
commit
1faabf7cd1
2 changed files with 12 additions and 8 deletions
|
@ -42,8 +42,9 @@ enum filebundle_type
|
|||
/* File bundle entry */
|
||||
typedef struct filebundle_entry
|
||||
{
|
||||
enum filebundle_type type;
|
||||
const char *name;
|
||||
enum filebundle_type type;
|
||||
const char *name;
|
||||
struct filebundle_entry *next;
|
||||
union {
|
||||
struct {
|
||||
size_t count;
|
||||
|
@ -55,7 +56,6 @@ typedef struct filebundle_entry
|
|||
ssize_t orig;
|
||||
} f;
|
||||
};
|
||||
struct filebundle_entry *next;
|
||||
} filebundle_entry_t;
|
||||
|
||||
/* File bundle directory entry */
|
||||
|
|
|
@ -90,9 +90,11 @@ def output_file ( path, name, idx, next = -1 ):
|
|||
print >>outf, ' .type = FB_FILE,'
|
||||
print >>outf, ' .name = "%s",' % name
|
||||
print >>outf, ' .next = %s,' % n
|
||||
print >>outf, ' .f.size = %d,' % len(d)
|
||||
print >>outf, ' .f.orig = %d,' % o
|
||||
print >>outf, ' .f.data = filebundle_data_%06d,' % idx
|
||||
print >>outf, ' {'
|
||||
print >>outf, ' .f.size = %d,' % len(d)
|
||||
print >>outf, ' .f.orig = %d,' % o
|
||||
print >>outf, ' .f.data = filebundle_data_%06d' % idx
|
||||
print >>outf, ' },'
|
||||
print >>outf, '};'
|
||||
print >>outf, ''
|
||||
|
||||
|
@ -106,8 +108,10 @@ def output_dir ( path, name, idx, child, count, next = -1 ):
|
|||
print >>outf, ' .type = FB_DIR,'
|
||||
print >>outf, ' .name = "%s",' % name
|
||||
print >>outf, ' .next = %s,' % n
|
||||
print >>outf, ' .d.count = %d,' % count
|
||||
print >>outf, ' .d.child = &filebundle_entry_%06d,' % child
|
||||
print >>outf, ' {'
|
||||
print >>outf, ' .d.count = %d,' % count
|
||||
print >>outf, ' .d.child = &filebundle_entry_%06d' % child
|
||||
print >>outf, ' },'
|
||||
print >>outf, '};'
|
||||
print >>outf, ''
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue