mirror of
https://github.com/fadden/nulib2.git
synced 2024-12-27 17:29:57 +00:00
Upgraded to most recent autoconf. Un-nested some directives.
Fixed some compiler warnings from FileIO.c.
This commit is contained in:
parent
e67a0318fa
commit
5b1f00dd9d
@ -343,7 +343,7 @@ Nu_GetFileInfo(NuArchive* pArchive, const char* pathname,
|
||||
proType = 0xB3;
|
||||
proAux = 0x0000;
|
||||
} else {
|
||||
if ((fileType >> 24) & 0xFF == 'p') {
|
||||
if (((fileType >> 24) & 0xFF) == 'p') {
|
||||
proType = (fileType >> 16) & 0xFF;
|
||||
proAux = fileType & 0xFFFF;
|
||||
} else {
|
||||
@ -600,7 +600,7 @@ Nu_SetFileAccess(NuArchive* pArchive, const NuRecord* pRecord,
|
||||
// (S_IRUSR | S_IRGRP | S_IROTH) & ~mask, mask));
|
||||
if (chmod(pathname, (S_IRUSR | S_IRGRP | S_IROTH) & ~mask) < 0) {
|
||||
Nu_ReportError(NU_BLOB, errno,
|
||||
"unable to set access for '%s' to %03o", pathname, mask);
|
||||
"unable to set access for '%s' to %03o", pathname, (int) mask);
|
||||
err = kNuErrFileSetAccess;
|
||||
goto bail;
|
||||
}
|
||||
|
6419
nufxlib-0/configure
vendored
6419
nufxlib-0/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,6 @@ else
|
||||
BUILD_FLAGS='$(OPT) $(GCC_FLAGS)'
|
||||
fi
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Some host-specific stuff. Variables you can test (set by the
|
||||
dnl AC_CANONICAL_HOST call earlier) look like this:
|
||||
@ -147,6 +146,7 @@ AC_CACHE_VAL(nufxlib_cv_sprintf_returns_int, [
|
||||
[nufxlib_cv_sprintf_returns_int=yes], [nufxlib_cv_sprintf_returns_int=no],
|
||||
[nufxlib_cv_sprintf_returns_int=no])
|
||||
])
|
||||
|
||||
if test $nufxlib_cv_sprintf_returns_int = "yes"; then
|
||||
AC_DEFINE(SPRINTF_RETURNS_INT)
|
||||
fi
|
||||
@ -187,8 +187,17 @@ AC_ARG_ENABLE(deflate,
|
||||
[ ], [ enable_deflate=yes ])
|
||||
if test $enable_deflate = "yes"; then
|
||||
dnl Check for zlib. Make sure it comes with zlib.h.
|
||||
AC_CHECK_LIB(z, deflate,
|
||||
AC_CHECK_HEADER(zlib.h, AC_DEFINE(ENABLE_DEFLATE) LIBS="$LIBS -lz"))
|
||||
got_zlibh=false
|
||||
AC_CHECK_LIB(z, deflate, got_libz=true, got_libz=false)
|
||||
if $got_libz; then
|
||||
AC_CHECK_HEADER(zlib.h, got_zlibh=true LIBS="$LIBS -lz")
|
||||
fi
|
||||
if $got_zlibh; then
|
||||
echo " (found libz and zlib.h, enabling deflate)"
|
||||
AC_DEFINE(ENABLE_DEFLATE)
|
||||
else
|
||||
echo " (couldn't find libz and zlib.h, not enabling deflate)"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(bzip2,
|
||||
@ -196,8 +205,19 @@ AC_ARG_ENABLE(bzip2,
|
||||
[ ], [ enable_bzip2=no ])
|
||||
if test $enable_bzip2 = "yes"; then
|
||||
dnl Check for libbz2. Make sure it comes with bzlib.h.
|
||||
AC_CHECK_LIB(bz2, BZ2_bzCompress,
|
||||
AC_CHECK_HEADER(bzlib.h, AC_DEFINE(ENABLE_BZIP2) LIBS="$LIBS -lbz2"))
|
||||
dnl AC_CHECK_LIB(bz2, BZ2_bzCompress,
|
||||
dnl AC_CHECK_HEADER(bzlib.h, AC_DEFINE(ENABLE_BZIP2) LIBS="$LIBS -lbz2"))
|
||||
got_bzlibh=false
|
||||
AC_CHECK_LIB(bz2, BZ2_bzCompress, got_libbz=true, got_libbz=false)
|
||||
if $got_libbz; then
|
||||
AC_CHECK_HEADER(bzlib.h, got_bzlibh=true LIBS="$LIBS -lbz2")
|
||||
fi
|
||||
if $got_bzlibh; then
|
||||
echo " (found libbz2 and bzlib.h, enabling bzip2)"
|
||||
AC_DEFINE(ENABLE_BZIP2)
|
||||
else
|
||||
echo " (couldn't find libbz2 and bzlib.h, not enabling bzip2)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user