Skip to content

Instantly share code, notes, and snippets.

@apoleon
Created September 9, 2013 08:31
Show Gist options
  • Save apoleon/6492950 to your computer and use it in GitHub Desktop.
Save apoleon/6492950 to your computer and use it in GitHub Desktop.
From: Markus Koschany <apo@gambaru.de>
Date: Sat, 7 Sep 2013 13:10:43 +0200
Subject: define PATH_MAX for hurd
---
src/age/utils/utils.h | 4 ++++
src/kofola/apakdir.cpp | 4 ++++
src/komat/Mat3d.h | 4 ++++
src/tmp/compat.cpp | 4 ++++
src/tmp/compat_mini.h | 4 ++++
5 files changed, 20 insertions(+)
diff --git a/src/age/utils/utils.h b/src/age/utils/utils.h
index fca1905..0712018 100644
--- a/src/age/utils/utils.h
+++ b/src/age/utils/utils.h
@@ -46,6 +46,10 @@
#ifndef MAX_FILENAME_LENGTH
#define MAX_FILENAME_LENGTH 200
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#if PATH_MAX > MAX_FILENAME_LENGTH
#define MAX_FILENAME MAX_FILENAME_LENGTH
#else
diff --git a/src/kofola/apakdir.cpp b/src/kofola/apakdir.cpp
index 91e8ffd..3dda3e6 100644
--- a/src/kofola/apakdir.cpp
+++ b/src/kofola/apakdir.cpp
@@ -4,6 +4,10 @@
#include <limits.h>
#include "Apak.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
extern void apakError(APAK_HANDLE * pHandle, char *cError);
extern int apakReadError(int iError, APAK_HANDLE * pHandle);
diff --git a/src/komat/Mat3d.h b/src/komat/Mat3d.h
index f3a661a..24a0cad 100644
--- a/src/komat/Mat3d.h
+++ b/src/komat/Mat3d.h
@@ -4,6 +4,10 @@
#ifndef __MAT_3D_H
#define __MAT_3D_H
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#define MAT_TEXTUR 4
#define T_WRAP 0x1
diff --git a/src/tmp/compat.cpp b/src/tmp/compat.cpp
index babd29c..eaf5438 100644
--- a/src/tmp/compat.cpp
+++ b/src/tmp/compat.cpp
@@ -26,6 +26,10 @@
*
*/
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#include <sys/time.h>
#include "3d_all.h"
diff --git a/src/tmp/compat_mini.h b/src/tmp/compat_mini.h
index d2c33ed..817a532 100644
--- a/src/tmp/compat_mini.h
+++ b/src/tmp/compat_mini.h
@@ -33,6 +33,10 @@
extern "C" {
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#include "compatibility.h"
#include <string.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment