From cd3587bbf3af3632d5857bc8a22b09a2786bcf87 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 17 Mar 2010 15:35:29 -0400 Subject: [PATCH] Make ISO9660 archiver optional. --- CMakeLists.txt | 5 +++++ src/archiver_iso9660.c | 4 +++- src/physfs.c | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ad3f573..2f910cb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,6 +272,11 @@ IF(PHYSFS_ARCHIVE_QPAK) ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_QPAK=1) ENDIF(PHYSFS_ARCHIVE_QPAK) +OPTION(PHYSFS_ARCHIVE_ISO9660 "Enable ISO9660 support" TRUE) +IF(PHYSFS_ARCHIVE_ISO9660) + ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ISO9660=1) +ENDIF(PHYSFS_ARCHIVE_ISO9660) + # See if some archiver required zlib, and see about using system version. diff --git a/src/archiver_iso9660.c b/src/archiver_iso9660.c index 4df1effc..f247862b 100644 --- a/src/archiver_iso9660.c +++ b/src/archiver_iso9660.c @@ -22,7 +22,7 @@ * - Ambiguities in the standard */ -#include "physfs.h" +#if (defined PHYSFS_SUPPORTS_GRP) #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" @@ -1025,5 +1025,7 @@ const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660 = ISO9660_stat /* stat() method */ }; +#endif /* defined PHYSFS_SUPPORTS_ISO9660 */ + /* end of archiver_iso9660.c ... */ diff --git a/src/physfs.c b/src/physfs.c index 87193809..aa83d08d 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -93,7 +93,9 @@ static const PHYSFS_ArchiveInfo *supported_types[] = #if (defined PHYSFS_SUPPORTS_WAD) &__PHYSFS_ArchiveInfo_WAD, #endif +#if (defined PHYSFS_SUPPORTS_ISO9660) &__PHYSFS_ArchiveInfo_ISO9660, +#endif NULL }; @@ -121,7 +123,9 @@ static const PHYSFS_Archiver *archivers[] = #if (defined PHYSFS_SUPPORTS_WAD) &__PHYSFS_Archiver_WAD, #endif +#if (defined PHYSFS_SUPPORTS_ISO9660) &__PHYSFS_Archiver_ISO9660, +#endif NULL };