1139804Simp/* 265534Salfred * Header file mkisofs.h - assorted structure definitions and typecasts. 3143427Srwatson 465534Salfred Written by Eric Youngdale (1993). 561837Salfred 661837Salfred Copyright 1993 Yggdrasil Computing, Incorporated 761837Salfred 861837Salfred This program is free software; you can redistribute it and/or modify 961837Salfred it under the terms of the GNU General Public License as published by 1061837Salfred the Free Software Foundation; either version 2, or (at your option) 1161837Salfred any later version. 1261837Salfred 1361837Salfred This program is distributed in the hope that it will be useful, 1461837Salfred but WITHOUT ANY WARRANTY; without even the implied warranty of 1561837Salfred MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1661837Salfred GNU General Public License for more details. 1761837Salfred 1861837Salfred You should have received a copy of the GNU General Public License 1961837Salfred along with this program; if not, write to the Free Software 2061837Salfred Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 2161837Salfred 2261837Salfred/* 2361837Salfred * $Id: mkisofs.h,v 1.5 2023/11/21 08:46:06 jmatthew Exp $ 2461837Salfred */ 2561837Salfred 2661837Salfred/* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 12/3/99 */ 2761837Salfred 2861837Salfred#include <stdio.h> 29116182Sobrien#include <prototyp.h> 30116182Sobrien 31116182Sobrien/* This symbol is used to indicate that we do not have things like 3261837Salfred symlinks, devices, and so forth available. Just files and dirs */ 3361837Salfred 3477598Sjesper#ifdef VMS 3561837Salfred#define NON_UNIXFS 3661837Salfred#endif 3761837Salfred 3861837Salfred#ifdef DJGPP 39129920Srwatson#define NON_UNIXFS 4061837Salfred#endif 4161837Salfred 42129876Sphk#ifdef VMS 43129920Srwatson#include <sys/dir.h> 4461837Salfred#define dirent direct 4565534Salfred#endif 4661837Salfred 4761837Salfred#ifdef _WIN32 4861837Salfred#define NON_UNIXFS 4961837Salfred#endif /* _WIN32 */ 50129920Srwatson 51129920Srwatson#include <string.h> 52129920Srwatson#include <sys/types.h> 53129920Srwatson#include <sys/stat.h> 54129920Srwatson 55129920Srwatson#if defined(HAVE_DIRENT_H) 5661837Salfred# include <dirent.h> 5761837Salfred# define NAMLEN(dirent) strlen((dirent)->d_name) 5861837Salfred#else 5961837Salfred# define dirent direct 6061837Salfred# define NAMLEN(dirent) (dirent)->d_namlen 6165534Salfred# if defined(HAVE_SYS_NDIR_H) 6265534Salfred# include <sys/ndir.h> 6365534Salfred# endif 6465534Salfred# if defined(HAVE_SYS_DIR_H) 6565534Salfred# include <sys/dir.h> 6665534Salfred# endif 6765534Salfred# if defined(HAVE_NDIR_H) 6861837Salfred# include <ndir.h> 69142056Srwatson# endif 70142056Srwatson#endif 71142056Srwatson 7261837Salfred#if defined(HAVE_STRING_H) 7361837Salfred#include <string.h> 7461837Salfred#else 7561837Salfred#if defined(HAVE_STRINGS_H) 7661837Salfred#include <strings.h> 7761837Salfred#endif 78129920Srwatson#endif 7961837Salfred 8061837Salfred#ifdef ultrix 8161837Salfredextern char *strdup(); 82129920Srwatson#endif 8361837Salfred 8461837Salfred#ifdef __STDC__ 8561837Salfred#define DECL(NAME,ARGS) NAME ARGS 86129920Srwatson#define FDECL1(NAME,TYPE0, ARG0) \ 87184205Sdes NAME(TYPE0 ARG0) 8861837Salfred#define FDECL2(NAME,TYPE0, ARG0,TYPE1, ARG1) \ 8961837Salfred NAME(TYPE0 ARG0, TYPE1 ARG1) 9061837Salfred#define FDECL3(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2) \ 9161837Salfred NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2) 9261837Salfred#define FDECL4(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3) \ 9361837Salfred NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3) 94129920Srwatson#define FDECL5(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4) \ 9561837Salfred NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3, TYPE4 ARG4) 9661837Salfred#define FDECL6(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4, TYPE5, ARG5) \ 9761837Salfred NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3, TYPE4 ARG4, TYPE5 ARG5) 9861837Salfred#else 9961837Salfred#define DECL(NAME,ARGS) NAME() 10061837Salfred#define FDECL1(NAME,TYPE0, ARG0) NAME(ARG0) TYPE0 ARG0; 10161837Salfred#define FDECL2(NAME,TYPE0, ARG0,TYPE1, ARG1) NAME(ARG0, ARG1) TYPE0 ARG0; TYPE1 ARG1; 10261837Salfred#define FDECL3(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2) \ 10361837Salfred NAME(ARG0, ARG1, ARG2) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; 10461837Salfred#define FDECL4(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3) \ 10561837Salfred NAME(ARG0, ARG1, ARG2, ARG3, ARG4) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3; 10661837Salfred#define FDECL5(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4) \ 10761837Salfred NAME(ARG0, ARG1, ARG2, ARG3, ARG4) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3; TYPE4 ARG4; 10861837Salfred#define FDECL6(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4, TYPE5, ARG5) \ 10961837Salfred NAME(ARG0, ARG1, ARG2, ARG3, ARG4, ARG5) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3; TYPE4 ARG4; TYPE5 ARG5; 11061837Salfred#define const 11161837Salfred#endif 11261837Salfred 11361837Salfred 11461837Salfred#ifdef __SVR4 11561837Salfred#include <stdlib.h> 116129920Srwatson#else 11761837Salfredextern int optind; 11861837Salfredextern char *optarg; 119129920Srwatson/* extern int getopt (int __argc, char **__argv, char *__optstring); */ 120129920Srwatson#endif 12161837Salfred 122129920Srwatson#include "iso9660.h" 12361837Salfred#include "defaults.h" 12461837Salfred#ifdef APPLE_HYB 12561837Salfred#include <mactypes.h> 12661837Salfred#include <hfs.h> 12761837Salfredstruct hfs_info { 12861837Salfred hfsdirent hfs_ent; 12961837Salfred char *keyname; 130142060Srwatson struct hfs_info *next; 13161837Salfred}; 13261837Salfred#endif /* APPLE_HYB */ 13361837Salfred 134184205Sdesstruct directory_entry{ 135142056Srwatson struct directory_entry * next; 13661837Salfred struct directory_entry * jnext; 13761837Salfred struct iso_directory_record isorec; 13861837Salfred unsigned int starting_block; 13961837Salfred unsigned int size; 14061837Salfred unsigned short priority; 14163645Salfred unsigned char jreclen; /* Joliet record len */ 142142056Srwatson char * name; 143142056Srwatson char * table; 144142056Srwatson char * whole_name; 145142056Srwatson struct directory * filedir; 14663645Salfred struct directory_entry * parent_rec; 14765534Salfred unsigned int de_flags; 14865534Salfred ino_t inode; /* Used in the hash table */ 14965534Salfred dev_t dev; /* Used in the hash table */ 15065534Salfred unsigned char * rr_attributes; 15161837Salfred unsigned int rr_attr_size; 15261837Salfred unsigned int total_rr_attr_size; 15361837Salfred unsigned int got_rr_name; 15461837Salfred#ifdef APPLE_HYB 15561837Salfred struct directory_entry * assoc; /* entry has a resource fork */ 15661837Salfred hfsdirent *hfs_ent; /* HFS parameters */ 15761837Salfred unsigned int hfs_off; /* offset to real start of fork */ 15861837Salfred unsigned int hfs_type; /* type of HFS Unix file */ 15961837Salfred#endif /* APPLE_HYB */ 16061837Salfred}; 16161837Salfred 16261837Salfredstruct file_hash{ 16361837Salfred struct file_hash * next; 164142058Srwatson ino_t inode; /* Used in the hash table */ 165142058Srwatson dev_t dev; /* Used in the hash table */ 166143463Srwatson unsigned int starting_block; 167143463Srwatson unsigned int size; 168143463Srwatson}; 169143463Srwatson 170143463Srwatson 171143463Srwatson/* 172184205Sdes * This structure is used to control the output of fragments to the cdrom 173143463Srwatson * image. Everything that will be written to the output image will eventually 174143463Srwatson * go through this structure. There are two pieces - first is the sizing where 175143463Srwatson * we establish extent numbers for everything, and the second is when we actually 176143463Srwatson * generate the contents and write it to the output image. 177143463Srwatson * 178143463Srwatson * This makes it trivial to extend mkisofs to write special things in the image. 179147300Smaxim * All you need to do is hook an additional structure in the list, and the rest 180147300Smaxim * works like magic. 181143463Srwatson * 182147300Smaxim * The three passes each do the following: 183143463Srwatson * 184143463Srwatson * The 'size' pass determines the size of each component and assigns the extent number 185143463Srwatson * for that component. 186143463Srwatson * 187143463Srwatson * The 'generate' pass will adjust the contents and pointers as required now that extent 188143463Srwatson * numbers are assigned. In some cases, the contents of the record are also generated. 189143463Srwatson * 190184205Sdes * The 'write' pass actually writes the data to the disc. 191143463Srwatson */ 192143463Srwatsonstruct output_fragment 193143463Srwatson{ 194143463Srwatson struct output_fragment * of_next; 195142060Srwatson#ifdef __STDC__ 196142058Srwatson int (*of_size)(int); 197142060Srwatson int (*of_generate)(void); 198142060Srwatson int (*of_write)(FILE *); 199142060Srwatson#else 200142060Srwatson int (*of_size)(); 201142058Srwatson int (*of_generate)(); 202142058Srwatson int (*of_write)(); 203143427Srwatson#endif 204142058Srwatson}; 205147300Smaxim 206143427Srwatsonextern struct output_fragment * out_list; 207143427Srwatsonextern struct output_fragment * out_tail; 208143427Srwatson 209143427Srwatsonextern struct output_fragment padblock_desc; 210143427Srwatsonextern struct output_fragment voldesc_desc; 211142058Srwatsonextern struct output_fragment joliet_desc; 212142058Srwatsonextern struct output_fragment torito_desc; 213142058Srwatsonextern struct output_fragment end_vol; 214142058Srwatsonextern struct output_fragment pathtable_desc; 215142058Srwatsonextern struct output_fragment jpathtable_desc; 216142058Srwatsonextern struct output_fragment dirtree_desc; 217143427Srwatsonextern struct output_fragment dirtree_clean; 218184205Sdesextern struct output_fragment jdirtree_desc; 219184205Sdesextern struct output_fragment extension_desc; 220142058Srwatsonextern struct output_fragment files_desc; 221142058Srwatson 222142058Srwatson/* 223142058Srwatson * This structure describes one complete directory. It has pointers 224142058Srwatson * to other directories in the overall tree so that it is clear where 225142058Srwatson * this directory lives in the tree, and it also must contain pointers 226143427Srwatson * to the contents of the directory. Note that subdirectories of this 227143427Srwatson * directory exist twice in this stucture. Once in the subdir chain, 228143461Srwatson * and again in the contents chain. 229143461Srwatson */ 230143427Srwatsonstruct directory{ 231184205Sdes struct directory * next; /* Next directory at same level as this one */ 232142058Srwatson struct directory * subdir; /* First subdirectory in this directory */ 233142058Srwatson struct directory * parent; 234142058Srwatson struct directory_entry * contents; 235142058Srwatson struct directory_entry * jcontents; 236142058Srwatson struct directory_entry * self; 237184205Sdes char * whole_name; /* Entire path */ 238142058Srwatson char * de_name; /* Entire path */ 239142058Srwatson unsigned int ce_bytes; /* Number of bytes of CE entries reqd for this dir */ 240142058Srwatson unsigned int depth; 241142058Srwatson unsigned int size; 242184205Sdes unsigned int extent; 243142058Srwatson unsigned int jsize; 244142058Srwatson unsigned int jextent; 245142058Srwatson unsigned short path_index; 246143461Srwatson unsigned short jpath_index; 247143461Srwatson unsigned short dir_flags; 248143461Srwatson unsigned short dir_nlink; 249143461Srwatson#ifdef APPLE_HYB 250142058Srwatson hfsdirent *hfs_ent; /* HFS parameters */ 251184205Sdes struct hfs_info *hfs_info; /* list of info for all entries in dir */ 252142058Srwatson#endif /* APPLE_HYB */ 253142058Srwatson}; 254142058Srwatson 255184205Sdesstruct deferred{ 256142058Srwatson struct deferred * next; 257142058Srwatson unsigned int starting_block; 258142058Srwatson char * name; 259142058Srwatson struct directory * filedir; 260143461Srwatson unsigned int flags; 261143461Srwatson}; 262143461Srwatson 263143461Srwatsonextern int goof; 264142058Srwatsonextern struct directory * root; 265143461Srwatsonextern struct directory * reloc_dir; 266143461Srwatsonextern unsigned int next_extent; 267142058Srwatsonextern unsigned int last_extent; 268142058Srwatsonextern unsigned int last_extent_written; 269142058Srwatsonextern unsigned int session_start; 270143461Srwatson 271142058Srwatsonextern unsigned int path_table_size; 272143461Srwatsonextern unsigned int path_table[4]; 273143461Srwatsonextern unsigned int path_blocks; 274143461Srwatsonextern char * path_table_l; 275142058Srwatsonextern char * path_table_m; 276142058Srwatson 277142058Srwatsonextern unsigned int jpath_table_size; 278142058Srwatsonextern unsigned int jpath_table[4]; 279142058Srwatsonextern unsigned int jpath_blocks; 280142058Srwatsonextern char * jpath_table_l; 281142058Srwatsonextern char * jpath_table_m; 282142058Srwatson 283142058Srwatsonextern struct iso_directory_record root_record; 284142058Srwatsonextern struct iso_directory_record jroot_record; 285142058Srwatson 286142058Srwatsonextern int use_eltorito; 287142058Srwatsonextern int use_RockRidge; 288142058Srwatsonextern int use_Joliet; 289142058Srwatsonextern int rationalize; 290142058Srwatsonextern int follow_links; 291142058Srwatsonextern int verbose; 292184205Sdesextern int all_files; 293184205Sdesextern int generate_tables; 294142058Srwatsonextern int print_size; 295142058Srwatsonextern int split_output; 296184205Sdesextern int omit_period; 297142058Srwatsonextern int omit_version_number; 298142058Srwatsonextern int transparent_compression; 299extern int RR_relocation_depth; 300extern int full_iso9660_filenames; 301extern int split_SL_component; 302extern int split_SL_field; 303#ifdef APPLE_HYB 304extern int apple_hyb; /* create HFS hybrid */ 305extern int apple_ext; /* use Apple extensions */ 306extern int apple_both; /* common flag (for above) */ 307extern int hfs_extra; /* extra ISO extents (hfs_ce_size) */ 308extern hce_mem *hce; /* libhfs/mkisofs extras */ 309extern int mac_name; /* use Mac name for ISO9660/Joliet/RR */ 310extern int create_dt; /* create the Desktp files */ 311extern char *hfs_boot_file; /* name of HFS boot file */ 312extern char *magic_file; /* magic file for CREATOR/TYPE matching */ 313extern int hfs_last; /* order in which to process map/magic files */ 314extern char *deftype; /* default Apple TYPE */ 315extern char *defcreator; /* default Apple CREATOR */ 316extern char *trans_tbl; /* translation table name */ 317extern int gen_pt; /* generate HFS partition table */ 318extern char *autoname; /* Autostart filename */ 319extern int bsize; /* Apple File Exchange block size */ 320extern char *hfs_volume_id; /* HFS volume ID */ 321#define ASSOC_FLAG 4 /* ISO flag for "associated" file */ 322#define MAP_LAST 1 /* process magic then map file */ 323#define MAG_LAST 2 /* process map then magic file */ 324extern char *hfs_bless; /* name of folder to 'bless' (System Folder) */ 325#endif /* APPLE_HYB */ 326 327/* tree.c */ 328extern int DECL(stat_filter, (char *, struct stat *)); 329extern int DECL(lstat_filter, (char *, struct stat *)); 330extern int DECL(sort_tree,(struct directory *)); 331extern struct directory * 332 DECL(find_or_create_directory,(struct directory *, const char *, 333 struct directory_entry * self, int)); 334extern void DECL (finish_cl_pl_entries, (void)); 335extern int DECL(scan_directory_tree,(struct directory * this_dir, 336 char * path, 337 struct directory_entry * self)); 338#ifdef APPLE_HYB 339extern int DECL(insert_file_entry,(struct directory *, char *, 340 char *, int)); 341#else 342extern int DECL(insert_file_entry,(struct directory *, char *, 343 char *)); 344#endif /* APPLE_HYB */ 345extern void DECL(generate_iso9660_directories,(struct directory *, FILE*)); 346extern void DECL(dump_tree,(struct directory * node)); 347extern struct directory_entry * DECL(search_tree_file, (struct 348 directory * node,char * filename)); 349extern void DECL(update_nlink_field,(struct directory * node)); 350extern void DECL (init_fstatbuf, (void)); 351extern struct stat root_statbuf; 352 353/* eltorito.c */ 354extern void DECL(init_boot_catalog, (const char * path )); 355extern void DECL(get_torito_desc, (struct eltorito_boot_descriptor * path )); 356 357/* write.c */ 358extern int DECL(get_733,(char *)); 359extern int DECL(isonum_733,(unsigned char *)); 360extern void DECL(set_723,(char *, unsigned int)); 361extern void DECL(set_731,(char *, unsigned int)); 362extern void DECL(set_721,(char *, unsigned int)); 363extern void DECL(set_733,(char *, unsigned int)); 364extern int DECL(sort_directory,(struct directory_entry **)); 365extern void DECL(generate_one_directory,(struct directory *, FILE*)); 366extern void DECL(memcpy_max, (char *, char *, int)); 367extern int DECL(oneblock_size, (int starting_extent)); 368extern struct iso_primary_descriptor vol_desc; 369extern void DECL(xfwrite, (void * buffer, int count, int size, FILE * file)); 370extern void DECL(set_732, (char * pnt, unsigned int i)); 371extern void DECL(set_722, (char * pnt, unsigned int i)); 372extern void DECL(outputlist_insert, (struct output_fragment * frag)); 373 374/* multi.c */ 375 376extern FILE * in_image; 377extern struct iso_directory_record * 378 DECL(merge_isofs,(char * path)); 379 380extern int DECL(free_mdinfo, (struct directory_entry **, int len)); 381 382extern struct directory_entry ** 383 DECL(read_merging_directory,(struct iso_directory_record *, int*)); 384extern void 385 DECL(merge_remaining_entries, (struct directory *, 386 struct directory_entry **, int)); 387extern int 388 DECL(merge_previous_session, (struct directory *, 389 struct iso_directory_record *)); 390 391extern int DECL(get_session_start, (int *)); 392 393/* joliet.c */ 394int DECL(joliet_sort_tree, (struct directory * node)); 395 396/* match.c */ 397extern int DECL(matches, (char *)); 398#ifdef APPLE_HYB 399extern int DECL(add_match, (char *)); 400#else 401extern void DECL(add_match, (char *)); 402#endif /* APPLE_HYB */ 403 404/* files.c */ 405struct dirent * DECL(readdir_add_files, (char **, char *, DIR *)); 406 407/* */ 408 409extern int DECL(iso9660_file_length,(const char* name, 410 struct directory_entry * sresult, int flag)); 411extern int DECL(iso9660_date,(char *, time_t)); 412extern void DECL(add_hash,(struct directory_entry *)); 413extern struct file_hash * DECL(find_hash,(dev_t, ino_t)); 414#ifdef APPLE_HYB 415extern void flush_hash(); 416#endif /* APPLE_HYB */ 417extern void DECL(add_directory_hash,(dev_t, ino_t)); 418extern struct file_hash * DECL(find_directory_hash,(dev_t, ino_t)); 419extern void DECL (flush_file_hash, (void)); 420extern int DECL(delete_file_hash,(struct directory_entry *)); 421extern struct directory_entry * DECL(find_file_hash,(char *)); 422extern void DECL(add_file_hash,(struct directory_entry *)); 423extern int DECL(generate_rock_ridge_attributes,(char *, char *, 424 struct directory_entry *, 425 struct stat *, struct stat *, 426 int deep_flag)); 427extern char * DECL(generate_rr_extension_record,(char * id, char * descriptor, 428 char * source, int * size)); 429 430extern int DECL(check_prev_session, (struct directory_entry **, int len, 431 struct directory_entry *, 432 struct stat *, 433 struct stat *, 434 struct directory_entry **)); 435 436#ifdef USE_SCG 437/* scsi.c */ 438#ifdef __STDC__ 439extern int readsecs(int startsecno, void *buffer, int sectorcount); 440extern int scsidev_open(char *path); 441#else 442extern int readsecs(); 443extern int scsidev_open(); 444#endif 445#endif 446 447extern char * extension_record; 448extern int extension_record_extent; 449extern int n_data_extents; 450 451/* These are a few goodies that can be specified on the command line, and are 452 filled into the root record */ 453 454extern char * preparer; 455extern char * publisher; 456extern char * copyright; 457extern char * biblio; 458extern char * abstract; 459extern char * appid; 460extern char * volset_id; 461extern char * system_id; 462extern char * volume_id; 463extern char * boot_catalog; 464extern char * boot_image; 465extern char * efi_boot_image; 466extern int volume_set_size; 467extern int volume_sequence_number; 468 469extern void * DECL(e_malloc,(size_t)); 470 471 472#define SECTOR_SIZE (2048) 473#define ROUND_UP(X) ((X + (SECTOR_SIZE - 1)) & ~(SECTOR_SIZE - 1)) 474#ifdef APPLE_HYB 475#define V_ROUND_UP(X,Y) (((X + (Y - 1)) / Y) * Y) 476#define H_ROUND_UP(X) ROUND_UP(((X)*HFS_BLOCKSZ)) 477/* ISO blocks == 2048, HFS blocks == 512 */ 478#define BLK_CONV (SECTOR_SIZE/HFS_BLOCKSZ) 479 480#define USE_MAC_NAME(N,E) ((N) && ((E)->hfs_ent != NULL) && (E)->hfs_type) 481#endif /* APPLE_HYB */ 482 483#define NEED_RE 1 484#define NEED_PL 2 485#define NEED_CL 4 486#define NEED_CE 8 487#define NEED_SP 16 488 489#define PREV_SESS_DEV (sizeof(dev_t) >= 4 ? 0x7ffffffd : 0x7ffd) 490#define TABLE_INODE (sizeof(ino_t) >= 8 ? 0x7ffffffffffffffeLL : 0x7ffffffe) 491#define UNCACHED_INODE (sizeof(ino_t) >= 8 ? 0x7fffffffffffffffLL : 0x7fffffff) 492#define UNCACHED_DEVICE (sizeof(dev_t) >= 4 ? 0x7fffffff : 0x7fff) 493 494#ifdef VMS 495#define STAT_INODE(X) (X.st_ino[0]) 496#define PATH_SEPARATOR ']' 497#define SPATH_SEPARATOR "" 498#else 499#define STAT_INODE(X) (X.st_ino) 500#define PATH_SEPARATOR '/' 501#define SPATH_SEPARATOR "/" 502#endif 503 504/* 505 * When using multi-session, indicates that we can reuse the 506 * TRANS.TBL information for this directory entry. If this flag 507 * is set for all entries in a directory, it means we can just 508 * reuse the TRANS.TBL and not generate a new one. 509 */ 510#define SAFE_TO_REUSE_TABLE_ENTRY 0x01 511#define DIR_HAS_DOT 0x02 512#define DIR_HAS_DOTDOT 0x04 513#define INHIBIT_JOLIET_ENTRY 0x08 514#define INHIBIT_RR_ENTRY 0x10 515#define RELOCATED_DIRECTORY 0x20 516#define INHIBIT_ISO9660_ENTRY 0x40 517 518/* 519 * Volume sequence number to use in all of the iso directory records. 520 */ 521#define DEF_VSN 1 522 523/* 524 * Make sure we have a definition for this. If not, take a very conservative 525 * guess. From what I can tell SunOS is the only one with this trouble. 526 */ 527#ifndef NAME_MAX 528#ifdef FILENAME_MAX 529#define NAME_MAX FILENAME_MAX 530#else 531#define NAME_MAX 128 532#endif 533#endif 534