Generalized CD-ROM routine selection.
This commit is contained in:
parent
6784bad378
commit
248b3381bf
13
configure.in
13
configure.in
|
@ -103,6 +103,19 @@ if test x$have_llseek = xyes; then
|
||||||
AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
|
AC_DEFINE([PHYSFS_HAVE_LLSEEK], 1, [define if we have llseek])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl BSD systems use sys/ucred.h for getting mounted volumes.
|
||||||
|
dnl Linux and others use mntent.h.
|
||||||
|
AC_CHECK_HEADER(sys/ucred.h, have_ucred_hdr=yes)
|
||||||
|
if test x$have_ucred_hdr = xyes; then
|
||||||
|
AC_DEFINE([PHYSFS_HAVE_SYS_UCRED_H], 1, [define if we have sys/ucred.h])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_HEADER(mntent.h, have_mntent_hdr=yes)
|
||||||
|
if test x$have_mntent_hdr = xyes; then
|
||||||
|
AC_DEFINE([PHYSFS_HAVE_MNTENT_H], 1, [define if we have mntent.h])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
require_zlib="no"
|
require_zlib="no"
|
||||||
|
|
||||||
dnl Check for zip archiver inclusion...
|
dnl Check for zip archiver inclusion...
|
||||||
|
|
|
@ -13,18 +13,6 @@
|
||||||
/* BeOS uses beos.cpp and posix.c ... Cygwin and such use win32.c ... */
|
/* BeOS uses beos.cpp and posix.c ... Cygwin and such use win32.c ... */
|
||||||
#if ((!defined __BEOS__) && (!defined WIN32))
|
#if ((!defined __BEOS__) && (!defined WIN32))
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
# if (!defined __BSD__)
|
|
||||||
# define __BSD__
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ((defined __APPLE__) && (defined __MACH__))
|
|
||||||
# if (!defined __BSD__)
|
|
||||||
# define __BSD__
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -38,15 +26,18 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if (defined __BSD__)
|
|
||||||
#include <sys/ucred.h>
|
|
||||||
#else
|
|
||||||
#include <mntent.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
|
|
||||||
|
#ifdef PHYSFS_HAVE_SYS_UCRED_H
|
||||||
|
# ifdef PHYSFS_HAVE_MNTENT_H
|
||||||
|
# undef PHYSFS_HAVE_MNTENT_H /* don't do both... */
|
||||||
|
# endif
|
||||||
|
# include <sys/ucred.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PHYSFS_HAVE_MNTENT_H
|
||||||
|
#include <mntent.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __PHYSICSFS_INTERNAL__
|
#define __PHYSICSFS_INTERNAL__
|
||||||
#include "physfs_internal.h"
|
#include "physfs_internal.h"
|
||||||
|
@ -68,7 +59,7 @@ int __PHYSFS_platformDeinit(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if (defined __BSD__)
|
#ifdef PHYSFS_HAVE_SYS_UCRED_H
|
||||||
|
|
||||||
char **__PHYSFS_platformDetectAvailableCDs(void)
|
char **__PHYSFS_platformDetectAvailableCDs(void)
|
||||||
{
|
{
|
||||||
|
@ -113,9 +104,10 @@ char **__PHYSFS_platformDetectAvailableCDs(void)
|
||||||
return(retval);
|
return(retval);
|
||||||
} /* __PHYSFS_platformDetectAvailableCDs */
|
} /* __PHYSFS_platformDetectAvailableCDs */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#else /* non-Darwin implementation... */
|
|
||||||
|
|
||||||
|
#ifdef PHYSFS_HAVE_MNTENT_H
|
||||||
|
|
||||||
char **__PHYSFS_platformDetectAvailableCDs(void)
|
char **__PHYSFS_platformDetectAvailableCDs(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue