This commit is contained in:
parent
63eb2d63b1
commit
11e9a11511
18 changed files with 1364 additions and 218 deletions
57
util/mkisofs/include/fctldefs.h
Normal file
57
util/mkisofs/include/fctldefs.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/* @(#)fctldefs.h 1.2 98/10/08 Copyright 1996 J. Schilling */
|
||||
/*
|
||||
* Generic header for users of open(), creat() and chmod()
|
||||
*
|
||||
* Copyright (c) 1996 J. Schilling
|
||||
*/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _FCTLDEFS_H
|
||||
#define _FCTLDEFS_H
|
||||
|
||||
#ifndef _MCONFIG_H
|
||||
#include <mconfig.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
|
||||
# include <fcntl.h>
|
||||
|
||||
#else /* HAVE_FCNTL_H */
|
||||
|
||||
# include <sys/file.h>
|
||||
|
||||
#endif /* HAVE_FCNTL_H */
|
||||
|
||||
/*
|
||||
* Do not define more than O_RDONLY / O_WRONLY / O_RDWR
|
||||
* The values may differ.
|
||||
*/
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY 0
|
||||
#endif
|
||||
#ifndef O_WRONLY
|
||||
#define O_WRONLY 1
|
||||
#endif
|
||||
#ifndef O_RDWR
|
||||
#define O_RDWR 2
|
||||
#endif
|
||||
|
||||
#endif /* _FCTLDEFS_H */
|
268
util/mkisofs/include/mconfig.h
Normal file
268
util/mkisofs/include/mconfig.h
Normal file
|
@ -0,0 +1,268 @@
|
|||
/* @(#)mconfig.h 1.24 98/12/14 Copyright 1995 J. Schilling */
|
||||
/*
|
||||
* definitions for machine configuration
|
||||
*
|
||||
* Copyright (c) 1995 J. Schilling
|
||||
*
|
||||
* This file must be included before any other file.
|
||||
* Use only cpp instructions.
|
||||
*
|
||||
* NOTE: SING: (Schily Is Not Gnu)
|
||||
*/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _MCONFIG_H
|
||||
#define _MCONFIG_H
|
||||
|
||||
/*
|
||||
* This hack that is needed as long as VMS has no POSIX shell.
|
||||
*/
|
||||
#ifdef VMS
|
||||
# define USE_STATIC_CONF
|
||||
#endif
|
||||
|
||||
#ifdef VANILLA_AUTOCONF
|
||||
#include <config.h>
|
||||
#else
|
||||
#ifdef USE_STATIC_CONF
|
||||
#include <xmconfig.h> /* This is the current static autoconf stuff */
|
||||
#else
|
||||
#include <xconfig.h> /* This is the current dynamic autoconf stuff */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(unix) || defined(__unix) || defined(__unix__)
|
||||
# define IS_UNIX
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
# define IS_MSDOS
|
||||
#endif
|
||||
|
||||
#if defined(tos) || defined(__tos)
|
||||
# define IS_TOS
|
||||
#endif
|
||||
|
||||
#ifdef THINK_C
|
||||
# define IS_MAC
|
||||
#endif
|
||||
|
||||
#if defined(sun) || defined(__sun) || defined(__sun__)
|
||||
# define IS_SUN
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN32__)
|
||||
# define IS_GCC_WIN32
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/*
|
||||
* Some magic that cannot (yet) be figured out with autoconf.
|
||||
*/
|
||||
|
||||
#ifdef sparc
|
||||
# ifndef HAVE_LDSTUB
|
||||
# define HAVE_LDSTUB
|
||||
# endif
|
||||
# ifndef HAVE_SCANSTACK
|
||||
# define HAVE_SCANSTACK
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__i386_) || defined(i386)
|
||||
# ifndef HAVE_XCHG
|
||||
# define HAVE_XCHG
|
||||
# endif
|
||||
# ifndef HAVE_SCANSTACK
|
||||
# define HAVE_SCANSTACK
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(SOL2) || defined(SOL2) || defined(S5R4) || defined(__S5R4) \
|
||||
|| defined(SVR4)
|
||||
# ifndef __SVR4
|
||||
# define __SVR4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __SVR4
|
||||
# ifndef SVR4
|
||||
# define SVR4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SunOS 4.x / SunOS 5.x
|
||||
*/
|
||||
#if defined(IS_SUN)
|
||||
# define HAVE_GETAV0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* AIX
|
||||
*/
|
||||
#if defined(_IBMR2) || defined(_AIX)
|
||||
# define IS_UNIX /* ??? really ??? */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Silicon Graphics (must be before SVR4)
|
||||
*/
|
||||
#if defined(sgi) || defined(__sgi)
|
||||
# define __NOT_SVR4__ /* Not a real SVR4 implementation */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Data General
|
||||
*/
|
||||
#if defined(__DGUX__)
|
||||
#ifdef XXXXXXX
|
||||
# undef HAVE_MTGET_DSREG
|
||||
# undef HAVE_MTGET_RESID
|
||||
# undef HAVE_MTGET_FILENO
|
||||
# undef HAVE_MTGET_BLKNO
|
||||
#endif
|
||||
# define mt_type mt_model
|
||||
# define mt_dsreg mt_status1
|
||||
# define mt_erreg mt_status2
|
||||
/*
|
||||
* DGUX hides its flock as dg_flock.
|
||||
*/
|
||||
# define HAVE_FLOCK
|
||||
# define flock dg_flock
|
||||
/*
|
||||
* Use the BSD style wait on DGUX to get the resource usages of child
|
||||
* processes.
|
||||
*/
|
||||
# define _BSD_WAIT_FLAVOR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Apple Rhapsody
|
||||
*/
|
||||
#if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
|
||||
# define HAVE_OSDEF /* prevent later definitions to overwrite current */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NextStep
|
||||
*/
|
||||
#if defined(__NeXT__) && !defined(HAVE_OSDEF)
|
||||
#define NO_PRINT_OVR
|
||||
#undef HAVE_USG_STDIO /*
|
||||
* NeXT Step 3.x uses __flsbuf(unsigned char , FILE *)
|
||||
* instead of __flsbuf(int, FILE *)
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NextStep 3.x has a broken linker that does not allow us to override
|
||||
* these functions.
|
||||
*/
|
||||
#ifndef __OPRINTF__
|
||||
|
||||
#ifdef NO_PRINT_OVR
|
||||
# define printf Xprintf
|
||||
# define fprintf Xfprintf
|
||||
# define sprintf Xsprintf
|
||||
#endif
|
||||
|
||||
#endif /* __OPRINTF__ */
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/*
|
||||
* If there is no flock defined by the system, use emulation
|
||||
* through fcntl record locking.
|
||||
*/
|
||||
#ifndef HAVE_FLOCK
|
||||
#define LOCK_SH 1 /* shared lock */
|
||||
#define LOCK_EX 2 /* exclusive lock */
|
||||
#define LOCK_NB 4 /* don't block when locking */
|
||||
#define LOCK_UN 8 /* unlock */
|
||||
#endif
|
||||
|
||||
#include <prototyp.h>
|
||||
|
||||
/*
|
||||
* gcc 2.x generally implements the long long type.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
# if __GNUC__ > 1
|
||||
# ifndef HAVE_LONGLONG
|
||||
# define HAVE_LONGLONG
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Convert to GNU name
|
||||
*/
|
||||
#ifdef HAVE_STDC_HEADERS
|
||||
# ifndef STDC_HEADERS
|
||||
# define STDC_HEADERS
|
||||
# endif
|
||||
#endif
|
||||
/*
|
||||
* Convert to SCHILY name
|
||||
*/
|
||||
#ifdef STDC_HEADERS
|
||||
# ifndef HAVE_STDC_HEADERS
|
||||
# define HAVE_STDC_HEADERS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef IS_UNIX
|
||||
# define PATH_DELIM '/'
|
||||
# define PATH_DELIM_STR "/"
|
||||
# define far
|
||||
# define near
|
||||
#endif
|
||||
|
||||
#ifdef IS_GCC_WIN32
|
||||
# define PATH_DELIM '/'
|
||||
# define PATH_DELIM_STR "/"
|
||||
# define far
|
||||
# define near
|
||||
#endif
|
||||
|
||||
#ifdef IS_MSDOS
|
||||
# define PATH_DELIM '\\'
|
||||
# define PATH_DELIM_STR "\\"
|
||||
#endif
|
||||
|
||||
#ifdef IS_TOS
|
||||
# define PATH_DELIM '\\'
|
||||
# define PATH_DELIM_STR "\\"
|
||||
# define far
|
||||
# define near
|
||||
#endif
|
||||
|
||||
#ifdef IS_MAC
|
||||
# define PATH_DELIM ':'
|
||||
# define PATH_DELIM_STR ":"
|
||||
# define far
|
||||
# define near
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MCONFIG_H */
|
74
util/mkisofs/include/prototyp.h
Normal file
74
util/mkisofs/include/prototyp.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
/* @(#)prototyp.h 1.7 98/10/08 Copyright 1995 J. Schilling */
|
||||
/*
|
||||
* Definitions for dealing with ANSI / KR C-Compilers
|
||||
*
|
||||
* Copyright (c) 1995 J. Schilling
|
||||
*/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _PROTOTYP_H
|
||||
#define _PROTOTYP_H
|
||||
|
||||
#ifndef PROTOTYPES
|
||||
/*
|
||||
* If this has already been defined,
|
||||
* someone else knows better than us...
|
||||
*/
|
||||
# ifdef __STDC__
|
||||
# if __STDC__ /* ANSI C */
|
||||
# define PROTOTYPES
|
||||
# endif
|
||||
# if defined(sun) && __STDC__ - 0 == 0 /* Sun C */
|
||||
# define PROTOTYPES
|
||||
# endif
|
||||
# endif
|
||||
#endif /* PROTOTYPES */
|
||||
|
||||
/*
|
||||
* If we have prototypes, we should have stdlib.h string.h stdarg.h
|
||||
*/
|
||||
#ifdef PROTOTYPES
|
||||
#if !(defined(SABER) && defined(sun))
|
||||
# ifndef HAVE_STDARG_H
|
||||
# define HAVE_STDARG_H
|
||||
# endif
|
||||
#endif
|
||||
# ifndef HAVE_STDLIB_H
|
||||
# define HAVE_STDLIB_H
|
||||
# endif
|
||||
# ifndef HAVE_STRING_H
|
||||
# define HAVE_STRING_H
|
||||
# endif
|
||||
# ifndef HAVE_STDC_HEADERS
|
||||
# define HAVE_STDC_HEADERS
|
||||
# endif
|
||||
# ifndef STDC_HEADERS
|
||||
# define STDC_HEADERS /* GNU name */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef NO_PROTOTYPES /* Force not to use prototypes */
|
||||
# undef PROTOTYPES
|
||||
#endif
|
||||
|
||||
#ifdef PROTOTYPES
|
||||
# define __PR(a) a
|
||||
#else
|
||||
# define __PR(a) ()
|
||||
#endif
|
||||
|
||||
#endif /* _PROTOTYP_H */
|
139
util/mkisofs/include/statdefs.h
Normal file
139
util/mkisofs/include/statdefs.h
Normal file
|
@ -0,0 +1,139 @@
|
|||
/* @(#)statdefs.h 1.1 98/11/22 Copyright 1998 J. Schilling */
|
||||
/*
|
||||
* Definitions for stat() file mode
|
||||
*
|
||||
* Copyright (c) 1998 J. Schilling
|
||||
*/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _STATDEFS_H
|
||||
#define _STATDEFS_H
|
||||
|
||||
#ifndef _MCONFIG_H
|
||||
#include <mconfig.h>
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
#undef S_ISFIFO /* Named pipe */
|
||||
#undef S_ISCHR /* Character special */
|
||||
#undef S_ISMPC /* UNUSED multiplexed c */
|
||||
#undef S_ISDIR /* Directory */
|
||||
#undef S_ISNAM /* Named file (XENIX) */
|
||||
#undef S_ISBLK /* Block special */
|
||||
#undef S_ISMPB /* UNUSED multiplexed b */
|
||||
#undef S_ISREG /* Regular file */
|
||||
#undef S_ISCNT /* Contiguous file */
|
||||
#undef S_ISLNK /* Symbolic link */
|
||||
#undef S_ISSHAD /* Solaris shadow inode */
|
||||
#undef S_ISSOCK /* UNIX domain socket */
|
||||
#undef S_ISDOOR /* Solaris DOOR */
|
||||
#endif
|
||||
|
||||
#ifndef S_ISFIFO /* Named pipe */
|
||||
# ifdef S_IFIFO
|
||||
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
# else
|
||||
# define S_ISFIFO(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISCHR /* Character special */
|
||||
# ifdef S_IFCHR
|
||||
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
# else
|
||||
# define S_ISCHR(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISMPC /* UNUSED multiplexed c */
|
||||
# ifdef S_IFMPC
|
||||
# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
|
||||
# else
|
||||
# define S_ISMPC(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISDIR /* Directory */
|
||||
# ifdef S_IFDIR
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# else
|
||||
# define S_ISDIR(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISNAM /* Named file (XENIX) */
|
||||
# ifdef S_IFNAM
|
||||
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
|
||||
# else
|
||||
# define S_ISNAM(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISBLK /* Block special */
|
||||
# ifdef S_IFBLK
|
||||
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
# else
|
||||
# define S_ISBLK(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISMPB /* UNUSED multiplexed b */
|
||||
# ifdef S_IFMPB
|
||||
# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
|
||||
# else
|
||||
# define S_ISMPB(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISREG /* Regular file */
|
||||
# ifdef S_IFREG
|
||||
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
# else
|
||||
# define S_ISREG(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISCNT /* Contiguous file */
|
||||
# ifdef S_IFCNT
|
||||
# define S_ISCNT(m) (((m) & S_IFMT) == S_IFCNT)
|
||||
# else
|
||||
# define S_ISCNT(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISLNK /* Symbolic link */
|
||||
# ifdef S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
# else
|
||||
# define S_ISLNK(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISSHAD /* Solaris shadow inode */
|
||||
# ifdef S_IFSHAD
|
||||
# define S_ISSHAD(m) (((m) & S_IFMT) == S_IFSHAD)
|
||||
# else
|
||||
# define S_ISSHAD(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISSOCK /* UNIX domain socket */
|
||||
# ifdef S_IFSOCK
|
||||
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
||||
# else
|
||||
# define S_ISSOCK(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef S_ISDOOR /* Solaris DOOR */
|
||||
# ifdef S_IFDOOR
|
||||
# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
|
||||
# else
|
||||
# define S_ISDOOR(m) (0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _STATDEFS_H */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue