2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)genisoimage.h 1.95 05/05/01 joerg */
14 /* Parts from @(#) 1.132 08/08/06 joerg */
16 * Header file genisoimage.h - assorted structure definitions and typecasts.
18 * Written by Eric Youngdale (1993).
20 * Copyright 1993 Yggdrasil Computing, Incorporated
21 * Copyright (c) 1999,2000-2003 J. Schilling
23 * This program is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2, or (at your option)
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
38 /* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 23/2/2000 */
40 #define APPID_DEFAULT "GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM"
43 #include <mconfig.h> /* Must be before stdio.h for LARGEFILE support */
47 #include <unixstd.h> /* Needed for for LARGEFILE support */
66 * XXX Hack until fseeko()/ftello() are available everywhere or until
67 * XXX we know a secure way to let autoconf ckeck for fseeko()/ftello()
68 * XXX without defining FILE_OFFSETBITS to 64 in confdefs.h
84 extern struct unls_table *in_nls; /* input UNICODE conversion table */
85 extern struct unls_table *out_nls; /* output UNICODE conversion table */
86 extern struct unls_table *hfs_inls; /* input HFS UNICODE conversion table */
87 extern struct unls_table *hfs_onls; /* output HFS UNICODE conversion table */
94 unsigned char finderinfo[32];
95 char name[HFS_MAX_FLEN + 1];
96 /* should have fields for dates here as well */
98 struct hfs_info *next;
101 #endif /* APPLE_HYB */
103 struct directory_entry {
104 struct directory_entry *next;
105 struct directory_entry *jnext;
106 struct iso_directory_record isorec;
107 unsigned int starting_block;
109 #ifdef USE_LARGEFILES
110 int mxpart; /* Extent number */
112 unsigned short priority;
113 unsigned char jreclen; /* Joliet record len */
117 struct directory *filedir;
118 struct directory_entry *parent_rec;
119 struct directory_entry *mxroot; /* Pointer to orig entry */
120 unsigned int de_flags;
121 ino_t inode; /* Used in the hash table */
122 dev_t dev; /* Used in the hash table */
123 unsigned char *rr_attributes;
124 unsigned int rr_attr_size;
125 unsigned int total_rr_attr_size;
126 unsigned int got_rr_name;
128 struct directory_entry *assoc; /* entry has a resource fork */
129 hfsdirent *hfs_ent; /* HFS parameters */
130 off_t hfs_off; /* offset to real start of fork */
131 int hfs_type; /* type of HFS Unix file */
132 #endif /* APPLE_HYB */
134 int sort; /* sort weight for entry */
137 int udf_file_entry_sector; /* also used as UDF unique ID */
143 struct file_hash *next;
144 ino_t inode; /* Used in the hash table */
145 dev_t dev; /* Used in the hash table */
146 nlink_t nlink; /* Used to compute new link count */
147 unsigned int starting_block;
150 struct directory_entry *de;
156 * This structure is used to control the output of fragments to the cdrom
157 * image. Everything that will be written to the output image will eventually
158 * go through this structure. There are two pieces - first is the sizing where
159 * we establish extent numbers for everything, and the second is when we actually
160 * generate the contents and write it to the output image.
162 * This makes it trivial to extend genisoimage to write special things in the image.
163 * All you need to do is hook an additional structure in the list, and the rest
166 * The three passes each do the following:
168 * The 'size' pass determines the size of each component and assigns the extent number
169 * for that component.
171 * The 'generate' pass will adjust the contents and pointers as required now that extent
172 * numbers are assigned. In some cases, the contents of the record are also generated.
174 * The 'write' pass actually writes the data to the disc.
176 struct output_fragment {
177 struct output_fragment *of_next;
179 int (*of_generate)(void);
180 int (*of_write)(FILE *);
181 char *of_name; /* Textual description */
182 unsigned int of_start_extent; /* For consist check */
185 extern struct output_fragment *out_list;
186 extern struct output_fragment *out_tail;
188 extern struct output_fragment startpad_desc;
189 extern struct output_fragment voldesc_desc;
190 extern struct output_fragment xvoldesc_desc;
191 extern struct output_fragment joliet_desc;
192 extern struct output_fragment torito_desc;
193 extern struct output_fragment end_vol;
194 extern struct output_fragment version_desc;
195 extern struct output_fragment pathtable_desc;
196 extern struct output_fragment jpathtable_desc;
197 extern struct output_fragment dirtree_desc;
198 extern struct output_fragment dirtree_clean;
199 extern struct output_fragment jdirtree_desc;
200 extern struct output_fragment extension_desc;
201 extern struct output_fragment files_desc;
202 extern struct output_fragment interpad_desc;
203 extern struct output_fragment endpad_desc;
204 extern struct output_fragment sunboot_desc;
205 extern struct output_fragment sunlabel_desc;
206 extern struct output_fragment genboot_desc;
207 extern struct output_fragment strfile_desc;
208 extern struct output_fragment strdir_desc;
209 extern struct output_fragment strpath_desc;
210 extern struct output_fragment alphaboot_desc;
211 extern struct output_fragment hppaboot_desc;
212 extern struct output_fragment alpha_hppa_boot_desc;
213 extern struct output_fragment mipsboot_desc;
214 extern struct output_fragment mipselboot_desc;
217 extern struct output_fragment hfs_desc;
219 #endif /* APPLE_HYB */
222 * This structure holds the information necessary to create a valid
223 * DVD-Video image. Basically it's how much to pad the files so the
224 * file offsets described in the video_ts.ifo and vts_xx_0.ifo are
225 * the correct one in the image that we create.
239 int number_of_vob_files;
240 int realsize_vob[10];
245 title_set_t *title_set;
247 #endif /* DVD_VIDEO */
250 * This structure describes one complete directory. It has pointers
251 * to other directories in the overall tree so that it is clear where
252 * this directory lives in the tree, and it also must contain pointers
253 * to the contents of the directory. Note that subdirectories of this
254 * directory exist twice in this stucture. Once in the subdir chain,
255 * and again in the contents chain.
258 struct directory *next; /* Next directory at same level as this one */
259 struct directory *subdir; /* First subdirectory in this directory */
260 struct directory *parent;
261 struct directory_entry *contents;
262 struct directory_entry *jcontents;
263 struct directory_entry *self;
264 char *whole_name; /* Entire path */
265 char *de_name; /* Entire path */
266 unsigned int ce_bytes; /* Number of bytes of CE entries read */
272 unsigned int jextent;
273 unsigned int path_index;
274 unsigned int jpath_index;
275 unsigned short dir_flags;
276 unsigned short dir_nlink;
278 hfsdirent *hfs_ent; /* HFS parameters */
279 struct hfs_info *hfs_info; /* list of info for all entries in dir */
280 #endif /* APPLE_HYB */
282 int sort; /* sort weight for child files */
286 struct deferred_write {
287 struct deferred_write *next;
292 struct directory_entry *s_entry;
297 struct eltorito_boot_entry_info {
298 struct eltorito_boot_entry_info *next;
309 extern struct directory *root;
310 extern struct directory *reloc_dir;
311 extern unsigned int next_extent;
312 extern unsigned int last_extent;
313 extern unsigned int last_extent_written;
314 extern unsigned int session_start;
316 extern unsigned int path_table_size;
317 extern unsigned int path_table[4];
318 extern unsigned int path_blocks;
319 extern char *path_table_l;
320 extern char *path_table_m;
322 extern unsigned int jpath_table_size;
323 extern unsigned int jpath_table[4];
324 extern unsigned int jpath_blocks;
325 extern char *jpath_table_l;
326 extern char *jpath_table_m;
328 extern struct iso_directory_record root_record;
329 extern struct iso_directory_record jroot_record;
331 extern int check_oldnames;
332 extern int check_session;
333 extern int use_eltorito;
334 extern int hard_disk_boot;
335 extern int not_bootable;
336 extern int no_emul_boot;
337 extern int load_addr;
338 extern int load_size;
339 extern int boot_info_table;
340 extern int use_RockRidge;
343 extern int use_Joliet;
344 extern int rationalize;
345 extern int rationalize_uid;
346 extern int rationalize_gid;
347 extern int rationalize_filemode;
348 extern int rationalize_dirmode;
349 extern uid_t uid_to_use;
350 extern gid_t gid_to_use;
351 extern int filemode_to_use;
352 extern int dirmode_to_use;
353 extern int new_dir_mode;
354 extern int follow_links;
355 extern int cache_inodes;
359 extern int all_files;
360 extern int generate_tables;
361 extern int print_size;
362 extern int split_output;
363 extern int use_graft_ptrs;
364 extern int jhide_trans_tbl;
365 extern int hide_rr_moved;
366 extern int omit_period;
367 extern int omit_version_number;
369 extern int transparent_compression;
370 extern Uint RR_relocation_depth;
371 extern int do_largefiles;
372 extern off_t maxnonlarge;
373 extern int iso9660_level;
374 extern int iso9660_namelen;
375 extern int full_iso9660_filenames;
376 extern int relaxed_filenames;
377 extern int allow_lowercase;
378 extern int allow_multidot;
379 extern int iso_translate;
380 extern int allow_leading_dots;
381 extern int use_fileversion;
382 extern int split_SL_component;
383 extern int split_SL_field;
384 extern char *trans_tbl;
385 extern char *outfile;
387 #define JMAX 64 /* maximum Joliet file name length (spec) */
388 #define JLONGMAX 103 /* out of spec Joliet file name length */
389 extern int jlen; /* selected maximum Joliet file name length */
392 extern int dvd_video;
393 #endif /* DVD_VIDEO */
397 extern int apple_hyb; /* create HFS hybrid */
398 extern int apple_ext; /* use Apple extensions */
399 extern int apple_both; /* common flag (for above) */
400 extern int hfs_extra; /* extra ISO extents (hfs_ce_size) */
401 extern hce_mem *hce; /* libhfs/genisoimage extras */
402 extern int use_mac_name; /* use Mac name for ISO9660/Joliet/RR */
403 extern int create_dt; /* create the Desktp files */
404 extern char *hfs_boot_file; /* name of HFS boot file */
405 extern char *magic_filename; /* magic file for CREATOR/TYPE matching */
406 extern int hfs_last; /* order in which to process map/magic files */
407 extern char *deftype; /* default Apple TYPE */
408 extern char *defcreator; /* default Apple CREATOR */
409 extern int gen_pt; /* generate HFS partition table */
410 extern char *autoname; /* Autostart filename */
411 extern int afe_size; /* Apple File Exchange block size */
412 extern char *hfs_volume_id; /* HFS volume ID */
413 extern int icon_pos; /* Keep Icon position */
414 extern int hfs_lock; /* lock HFS volume (read-only) */
415 extern char *hfs_bless; /* name of folder to 'bless' (System Folder) */
416 extern char *hfs_parms; /* low level HFS parameters */
418 #define MAP_LAST 1 /* process magic then map file */
419 #define MAG_LAST 2 /* process map then magic file */
423 #endif /* PREP_BOOT */
426 extern char *prep_boot_image[4];
427 extern int use_prep_boot;
428 extern int use_chrp_boot;
430 #endif /* PREP_BOOT */
431 #endif /* APPLE_HYB */
438 extern int stat_filter(char *, struct stat *);
439 extern int lstat_filter(char *, struct stat *);
440 extern int sort_tree(struct directory *);
441 extern struct directory *
442 find_or_create_directory(struct directory *, const char *,
443 struct directory_entry *self,
445 struct stat *stat_template);
446 extern void finish_cl_pl_entries(void);
447 extern int scan_directory_tree(struct directory *this_dir, char *path,
448 struct directory_entry *self);
451 extern int insert_file_entry(struct directory *, char *, char *, int);
453 extern int insert_file_entry(struct directory *, char *, char *);
454 #endif /* APPLE_HYB */
456 extern struct directory_entry *
457 dup_directory_entry __PR((struct directory_entry *s_entry));
458 extern void generate_iso9660_directories(struct directory *, FILE *);
459 extern void dump_tree(struct directory * node);
460 extern struct directory_entry *
461 search_tree_file(struct directory * node, char *filename);
462 extern void update_nlink_field(struct directory * node);
463 extern void init_fstatbuf(void);
464 extern struct stat root_statbuf;
465 extern struct stat fstatbuf;
468 extern void init_boot_catalog(const char *path);
469 extern void insert_boot_cat(void);
470 extern void get_boot_entry(void);
471 extern void new_boot_entry(void);
474 extern void sparc_boot_label(char *label);
475 extern void sunx86_boot_label(char *label);
476 extern void scan_sparc_boot(char *files);
477 extern void scan_sunx86_boot(char *files);
478 extern int make_sun_label(void);
479 extern int make_sunx86_label(void);
482 extern int add_boot_alpha_filename(char *filename);
485 extern int add_boot_hppa_cmdline(char *cmdline);
486 extern int add_boot_hppa_kernel_32(char *filename);
487 extern int add_boot_hppa_kernel_64(char *filename);
488 extern int add_boot_hppa_bootloader(char *filename);
489 extern int add_boot_hppa_ramdisk(char *filename);
492 extern int add_boot_mips_filename(char *filename);
495 extern int add_boot_mipsel_filename(char *filename);
498 extern unsigned long long rsync64(unsigned char *mem, size_t size);
501 extern int get_731(char *);
502 extern int get_732(char *);
503 extern int get_733(char *);
504 extern int isonum_733(unsigned char *);
505 extern void set_723(char *, unsigned int);
506 extern void set_731(char *, unsigned int);
507 extern void set_721(char *, unsigned int);
508 extern void set_733(char *, unsigned int);
509 extern int sort_directory(struct directory_entry **, int);
510 extern void generate_one_directory(struct directory *, FILE *);
511 extern void memcpy_max(char *, char *, int);
512 extern int oneblock_size(int starting_extent);
513 extern struct iso_primary_descriptor vol_desc;
514 extern void xfwrite(void *buffer, int size, int count, FILE *file, int submode,
516 extern void set_732(char *pnt, unsigned int i);
517 extern void set_722(char *pnt, unsigned int i);
518 extern void outputlist_insert(struct output_fragment * frag);
521 extern Ulong get_adj_size(int Csize);
522 extern int adj_size(int Csize, int start_extent, int extra);
523 extern void adj_size_other(struct directory * dpnt);
524 extern int insert_padding_file(int size);
525 extern int gen_mac_label(struct deferred_write *);
528 extern void gen_prepboot_label(unsigned char *);
530 #endif /* PREP_BOOT */
531 #endif /* APPLE_HYB */
535 extern FILE *in_image;
536 extern int open_merge_image(char *path);
537 extern int close_merge_image(void);
538 extern struct iso_directory_record *
539 merge_isofs(char *path);
540 extern unsigned char *parse_xa(unsigned char *pnt, int *lenp,
541 struct directory_entry *dpnt);
542 extern int rr_flags(struct iso_directory_record *idr);
543 extern int merge_previous_session(struct directory *,
544 struct iso_directory_record *,
546 extern int get_session_start(int *);
551 extern size_t convert_to_unicode (unsigned char *buffer,
552 int size, char *source, struct unls_table *inls);
554 extern void convert_to_unicode (unsigned char *buffer,
555 int size, char *source, struct unls_table *inls);
557 extern int joliet_strlen (const char *string, struct unls_table *inls);
559 extern unsigned char conv_charset(unsigned char, struct unls_table *,
560 struct unls_table *);
561 extern int joliet_sort_tree(struct directory * node);
564 extern int matches(char *);
565 extern int add_match(char *);
568 struct dirent *readdir_add_files(char **, char *, DIR *);
572 extern void iso9660_check(struct iso_directory_record *idr,
573 struct directory_entry *ndr);
574 extern int iso9660_file_length(const char *name,
575 struct directory_entry *sresult, int flag);
578 extern int iso9660_date(char *, time_t);
579 extern void add_hash(struct directory_entry *);
580 extern struct file_hash *find_hash(dev_t, ino_t);
582 extern void flush_hash(void);
583 extern void add_directory_hash(dev_t, ino_t);
584 extern struct file_hash *find_directory_hash(dev_t, ino_t);
585 extern void flush_file_hash(void);
586 extern int delete_file_hash(struct directory_entry *);
587 extern struct directory_entry *find_file_hash(char *);
588 extern void add_file_hash(struct directory_entry *);
590 extern int generate_xa_rr_attributes(char *, char *, struct directory_entry *,
591 struct stat *, struct stat *,
593 extern char *generate_rr_extension_record(char *id, char *descriptor,
594 char *source, int *size);
596 extern int check_prev_session(struct directory_entry **, int len,
597 struct directory_entry *, struct stat *,
598 struct stat *, struct directory_entry **);
600 extern void match_cl_re_entries(void);
601 extern void finish_cl_pl_for_prev_session(void);
602 extern char *find_rr_attribute(unsigned char *pnt, int len, char *attr_type);
606 extern int make_mac_volume(struct directory * dpnt, int start_extent);
607 extern int write_fork(hfsfile * hfp, long tot);
611 extern void del_hfs_info(struct hfs_info *);
612 extern int get_hfs_dir(char *, char *, struct directory_entry *);
613 extern int get_hfs_info(char *, char *, struct directory_entry *);
614 extern int get_hfs_rname(char *, char *, char *);
615 extern int hfs_exclude(char *);
616 extern void print_hfs_info(struct directory_entry *);
617 extern void hfs_init(char *, unsigned short, unsigned int);
618 extern void delete_rsrc_ent(struct directory_entry *);
619 extern void clean_hfs(void);
620 extern void perr(char *);
621 extern void set_root_info(char *);
625 extern int make_desktop(hfsvol *, int);
631 extern void gen_prepboot_label(MacLabel * mac_label);
633 extern int gen_mac_label(defer *);
635 extern int autostart(void);
639 extern char *get_magic_match(const char *);
640 extern void clean_magic(void);
642 #endif /* APPLE_HYB */
644 extern char *extension_record;
645 extern int extension_record_extent;
646 extern int n_data_extents;
649 * These are a few goodies that can be specified on the command line, and are
650 * filled into the root record
652 extern char *preparer;
653 extern char *publisher;
654 extern char *copyright;
656 extern char *abstract;
658 extern char *volset_id;
659 extern char *system_id;
660 extern char *volume_id;
661 extern char *boot_catalog;
662 extern char *boot_image;
663 extern char *genboot_image;
664 extern int ucs_level;
665 extern int volume_set_size;
666 extern int volume_sequence_number;
668 extern struct eltorito_boot_entry_info *first_boot_entry;
669 extern struct eltorito_boot_entry_info *last_boot_entry;
670 extern struct eltorito_boot_entry_info *current_boot_entry;
672 extern char *findgequal(char *);
673 extern void *e_malloc(size_t);
676 * Note: always use these macros to avoid problems.
678 * ISO_ROUND_UP(X) may cause an integer overflow and thus give
679 * incorrect results. So avoid it if possible.
681 * ISO_BLOCKS(X) is overflow safe. Prefer this when ever it is possible.
683 #define SECTOR_SIZE (2048)
684 #define ISO_ROUND_UP(X) (((X) + (SECTOR_SIZE - 1)) & ~(SECTOR_SIZE - 1))
685 #define ISO_BLOCKS(X) (((X) / SECTOR_SIZE) + (((X)%SECTOR_SIZE)?1:0))
687 #define ROUND_UP(X, Y) (((X + (Y - 1)) / Y) * Y)
691 * ISO blocks == 2048, HFS blocks == 512
693 #define HFS_BLK_CONV (SECTOR_SIZE/HFS_BLOCKSZ)
695 #define HFS_ROUND_UP(X) ISO_ROUND_UP(((X)*HFS_BLOCKSZ)) /* XXX ??? */
696 #define HFS_BLOCKS(X) (ISO_BLOCKS(X) * HFS_BLK_CONV)
698 #define USE_MAC_NAME(E) (use_mac_name && ((E)->hfs_ent != NULL) && (E)->hfs_type)
699 #endif /* APPLE_HYB */
704 #define NEED_RE 1 /* Need Relocated Direcotry */
705 #define NEED_PL 2 /* Need Parent link */
706 #define NEED_CL 4 /* Need Child link */
707 #define NEED_CE 8 /* Need Continuation Area */
708 #define NEED_SP 16 /* Need SUSP record */
710 #define RR_FLAG_PX 1 /* POSIX attributes */
711 #define RR_FLAG_PN 2 /* POSIX device number */
712 #define RR_FLAG_SL 4 /* Symlink */
713 #define RR_FLAG_NM 8 /* Alternate Name */
714 #define RR_FLAG_CL 16 /* Child link */
715 #define RR_FLAG_PL 32 /* Parent link */
716 #define RR_FLAG_RE 64 /* Relocated Direcotry */
717 #define RR_FLAG_TF 128 /* Time stamp */
719 #define RR_FLAG_SP 1024 /* SUSP record */
720 #define RR_FLAG_AA 2048 /* Apple Signature record */
721 #define RR_FLAG_XA 4096 /* XA signature record */
723 #define RR_FLAG_CE 8192 /* SUSP Continuation aerea */
724 #define RR_FLAG_ER 16384 /* Extension record for RR signature */
725 #define RR_FLAG_RR 32768 /* RR Signature in every file */
726 #define RR_FLAG_ZF 65535 /* Linux compression extension */
729 #define PREV_SESS_DEV (sizeof (dev_t) >= 4 ? 0x7ffffffd : 0x7ffd)
730 #define TABLE_INODE (sizeof (ino_t) >= 4 ? 0x7ffffffe : 0x7ffe)
731 #define UNCACHED_INODE (sizeof (ino_t) >= 4 ? 0x7fffffff : 0x7fff)
732 #define UNCACHED_DEVICE (sizeof (dev_t) >= 4 ? 0x7fffffff : 0x7fff)
735 #define STAT_INODE(X) (X.st_ino[0])
736 #define PATH_SEPARATOR ']'
737 #define SPATH_SEPARATOR ""
739 #define STAT_INODE(X) (X.st_ino)
740 #define PATH_SEPARATOR '/'
741 #define SPATH_SEPARATOR "/"
745 * When using multi-session, indicates that we can reuse the
746 * TRANS.TBL information for this directory entry. If this flag
747 * is set for all entries in a directory, it means we can just
748 * reuse the TRANS.TBL and not generate a new one.
750 #define SAFE_TO_REUSE_TABLE_ENTRY 0x01 /* de_flags only */
751 #define DIR_HAS_DOT 0x02 /* dir_flags only */
752 #define DIR_HAS_DOTDOT 0x04 /* dir_flags only */
753 #define INHIBIT_JOLIET_ENTRY 0x08
754 #define INHIBIT_RR_ENTRY 0x10 /* not used */
755 #define RELOCATED_DIRECTORY 0x20 /* de_flags only */
756 #define INHIBIT_ISO9660_ENTRY 0x40
757 #define MEMORY_FILE 0x80 /* de_flags only */
758 #define HIDDEN_FILE 0x100 /* de_flags only */
759 #define DIR_WAS_SCANNED 0x200 /* dir_flags only */
760 #define MULTI_EXTENT 0x1000 /* de_flags only */
761 #define INHIBIT_UDF_ENTRY 0x2000
764 * Volume sequence number to use in all of the iso directory records.
769 * Make sure we have a definition for this. If not, take a very conservative
771 * POSIX requires the max pathname component lenght to be defined in limits.h
772 * If variable, it may be undefined. If undefined, there should be
773 * a definition for _POSIX_NAME_MAX in limits.h or in unistd.h
774 * As _POSIX_NAME_MAX is defined to 14, we cannot use it.
775 * XXX Eric's wrong comment:
776 * XXX From what I can tell SunOS is the only one with this trouble.
783 #define NAME_MAX FILENAME_MAX
791 #define PATH_MAX FILENAME_MAX
793 #define PATH_MAX 1024
798 * XXX JS: Some structures have odd lengths!
799 * Some compilers (e.g. on Sun3/mc68020) padd the structures to even length.
800 * For this reason, we cannot use sizeof (struct iso_path_table) or
801 * sizeof (struct iso_directory_record) to compute on disk sizes.
802 * Instead, we use offsetof(..., name) and add the name size.
806 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
810 * EB: various shared stuff
812 extern char *merge_warn_msg;