Allow full-length Unix pathnames.

Move bits of HAVE_OPENCL/HAVE_WX for OS X from SConstruct to header files.

Use /usr/lib/libz on OS X now that we no longer have -L/opt/local/lib in
the library path. It is still possible that we could pick up a libz in
/usr/local/lib that would make the application non-redistributable, but
the danger is much less than previously.

Also bits of minor portability cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5868 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-10 21:17:08 +00:00
parent 379706b25a
commit addb89fecc
8 changed files with 79 additions and 87 deletions

View File

@ -5,8 +5,6 @@
#ifdef _WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#elif __APPLE__
#include <paths.h>
#include <Carbon/Carbon.h>
@ -14,10 +12,8 @@
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IOMedia.h>
#include <IOKit/IOBSD.h>
#elif __linux__
#include <fcntl.h>
#include <limits.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
@ -231,9 +227,9 @@ bool cdio_is_cdrom(std::string device)
for (unsigned int i = 0; i < devices.size(); i++)
{
#ifdef __linux__
if (strncmp(devices[i].c_str(), devname, PATH_MAX) == 0)
if (strncmp(devices[i].c_str(), devname, MAX_PATH) == 0)
#else
if (strncmp(devices[i].c_str(), device.c_str(), PATH_MAX) == 0)
if (strncmp(devices[i].c_str(), device.c_str(), MAX_PATH) == 0)
#endif
{
res = true;