[mupen64plus-core] 36/310: Add dummy PATH_MAX on systems without it

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.

commit 345f312c9a809061bebe0d46068d7ad9d77246fc
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Tue Jul 13 20:22:47 2010 +0200

    Add dummy PATH_MAX on systems without it
    
    Posix only defines that PATH_MAX may is defined through limits.h.
    GNU/Hurd has removed this definition without violating the standards.
    
    Mupen64Plus still relies on it and we work around that problem by
    defining PATH_MAX as 4096 in all places it is needed. This is not 100%
    correct as their are ways to generate longer paths, but mupen64plus must
    be heavily refactored in some places to fix the actual problem.
---
 debian/changelog              |  4 ++--
 debian/patches/path_max.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 545136f..29600ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,8 +18,8 @@ mupen64plus-core (1.99.4~hg20100511-1) UNRELEASED; urgency=low
       xdg-basedir.patch, static-binutils-libs.patch, rice_fog.patch,
       ftbfs-gvariant-type-conflicts.patch, dont-install-unneeded.patch,
       rice-ati-symbols.patch, link_gdk.patch
-    - Rebase default-optimisations.patch and dejavu-font.patch against
-      1.99.4~hg20100511
+    - Rebase default-optimisations.patch, dejavu-font.patch and path_max.patch
+      against 1.99.4~hg20100511
     - Add hurd_os.patch, Add GNU/Hurd as operating system with "linux" userland
   * Convert to 3.0 (quilt) source format
   * debian/control:
diff --git a/debian/patches/path_max.patch b/debian/patches/path_max.patch
new file mode 100644
index 0000000..7d4122a
--- /dev/null
+++ b/debian/patches/path_max.patch
@@ -0,0 +1,40 @@
+Description: Add dummy PATH_MAX on systems without it
+ Posix only defines that PATH_MAX may is defined through limits.h. GNU/Hurd has
+ removed this definition without violating the standards.
+ .
+ Mupen64Plus still relies on it and we work around that problem by defining
+ PATH_MAX as 4096 in all places it is needed. This is not 100% correct as their
+ are ways to generate longer paths, but mupen64plus must be heavily refactored
+ in some places to fix the actual problem.
+Bug-Debian: http://bugs.debian.org/588066
+Author: Sven Eckelmann <sven.eckelmann at gmx.de>
+
+---
+diff --git a/src/osal/files.h b/src/osal/files.h
+index ca1e8ec92753a979f53f83261138cd38f50d0dab..864eca1f712ebb76cc67cf0cf7b8636ab3e3b994 100644
+--- a/src/osal/files.h
++++ b/src/osal/files.h
+@@ -35,6 +35,11 @@
+   #define OSAL_DIR_SEPARATOR           '/'
+   #include <limits.h>  // for PATH_MAX
+   #include <unistd.h>  // for unlink()
++
++  /* PATH_MAX only may be defined by limits.h */
++  #ifndef PATH_MAX
++    #define PATH_MAX 4096
++  #endif
+ #endif
+ 
+ extern int osal_mkdirp(const char *dirpath, int mode);
+diff --git a/src/osal/files_unix.c b/src/osal/files_unix.c
+index c151157c1343376c7fbe8f4a9a11a944221b17e6..b17a451dea1a07f78d82110999e48e884bdc6295 100644
+--- a/src/osal/files_unix.c
++++ b/src/osal/files_unix.c
+@@ -29,7 +29,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+-#include <limits.h>
+ 
+ #include "files.h"
+ #include "api/m64p_types.h"
diff --git a/debian/patches/series b/debian/patches/series
index 3a0747c..7ac99ce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 default-optimisations.patch
 dejavu-font.patch
 hurd_os.patch
+path_max.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git



More information about the Pkg-games-commits mailing list