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
|
@ -44,6 +44,7 @@ typedef struct filebundle_entry
|
||||||
{
|
{
|
||||||
enum filebundle_type type;
|
enum filebundle_type type;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
struct filebundle_entry *next;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
size_t count;
|
size_t count;
|
||||||
|
@ -55,7 +56,6 @@ typedef struct filebundle_entry
|
||||||
ssize_t orig;
|
ssize_t orig;
|
||||||
} f;
|
} f;
|
||||||
};
|
};
|
||||||
struct filebundle_entry *next;
|
|
||||||
} filebundle_entry_t;
|
} filebundle_entry_t;
|
||||||
|
|
||||||
/* File bundle directory entry */
|
/* File bundle directory entry */
|
||||||
|
|
|
@ -90,9 +90,11 @@ def output_file ( path, name, idx, next = -1 ):
|
||||||
print >>outf, ' .type = FB_FILE,'
|
print >>outf, ' .type = FB_FILE,'
|
||||||
print >>outf, ' .name = "%s",' % name
|
print >>outf, ' .name = "%s",' % name
|
||||||
print >>outf, ' .next = %s,' % n
|
print >>outf, ' .next = %s,' % n
|
||||||
|
print >>outf, ' {'
|
||||||
print >>outf, ' .f.size = %d,' % len(d)
|
print >>outf, ' .f.size = %d,' % len(d)
|
||||||
print >>outf, ' .f.orig = %d,' % o
|
print >>outf, ' .f.orig = %d,' % o
|
||||||
print >>outf, ' .f.data = filebundle_data_%06d,' % idx
|
print >>outf, ' .f.data = filebundle_data_%06d' % idx
|
||||||
|
print >>outf, ' },'
|
||||||
print >>outf, '};'
|
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, ' .type = FB_DIR,'
|
||||||
print >>outf, ' .name = "%s",' % name
|
print >>outf, ' .name = "%s",' % name
|
||||||
print >>outf, ' .next = %s,' % n
|
print >>outf, ' .next = %s,' % n
|
||||||
|
print >>outf, ' {'
|
||||||
print >>outf, ' .d.count = %d,' % count
|
print >>outf, ' .d.count = %d,' % count
|
||||||
print >>outf, ' .d.child = &filebundle_entry_%06d,' % child
|
print >>outf, ' .d.child = &filebundle_entry_%06d' % child
|
||||||
|
print >>outf, ' },'
|
||||||
print >>outf, '};'
|
print >>outf, '};'
|
||||||
print >>outf, ''
|
print >>outf, ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue