# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF([long])
# Checks for library functions.
AC_CHECK_FUNCS([strchr strdup strstr timegm strcasecmp])
/*
* Copyright 2001-2007 Internet2
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
/**
* PathResolver.cpp
- *
- * Resolves local filenames into absolute pathnames.
+ *
+ * Resolves local filenames into absolute pathnames.
*/
#include "internal.h"
if (!isAbsolute(s.c_str())) {
switch (filetype) {
case XMLTOOLING_LIB_FILE:
- s = string(prefix ? prefix : m_defaultPrefix) + "/lib/" + (pkgname ? pkgname : m_defaultPackage) + '/' + s;
+ s = string(prefix ? prefix : m_defaultPrefix) +
+#if (SIZEOF_LONG == 8)
+ "/lib64/"
+#else
+ "/lib/"
+#endif
+ + (pkgname ? pkgname : m_defaultPackage) + '/' + s;
break;
-
+
case XMLTOOLING_LOG_FILE:
if (prefix || m_defaultPrefix != "/usr")
s = string(prefix ? prefix : m_defaultPrefix) + "/var/log/" + (pkgname ? pkgname : m_defaultPackage) + '/' + s;
else
s = string("/etc/") + (pkgname ? pkgname : m_defaultPackage) + '/' + s;
break;
-
+
default:
throw XMLToolingException("Unknown file type to resolve.");
}