[mupen64plus-video-rice] 27/191: Add dummy PATH_MAX on systems without it

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:12 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-video-rice.

commit 0c5377414953f5418d8f43095246ffe42b5eb0e9
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Tue Jul 13 21:03:14 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              |  3 ++-
 debian/patches/path_max.patch | 57 +++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 4835a2e..af88874 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,7 +18,8 @@ mupen64plus-video-rice (1.99.4~hg20100403-1) UNRELEASED; urgency=low
       system-zlib.patch, version-string.patch, xdg-basedir.patch,
       rice_fog.patch, ftbfs-gvariant-type-conflicts.patch,
       dont-install-unneeded.patch, rice-ati-symbols.patch, link_gdk.patch
-    - Rebase default-optimisations.patch against 1.99.4~hg20100403
+    - Rebase default-optimisations.patch and path_max.patch against
+      1.99.4~hg20100403
     - 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..87a3079
--- /dev/null
+++ b/debian/patches/path_max.patch
@@ -0,0 +1,57 @@
+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/Config.cpp b/src/Config.cpp
+index 032544322af554bfa2edf26fc5cc651ce0d940f4..68efb603949b98e62d096111adbcea26a3a5ae9a 100644
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ #include <fstream>
+ 
+ #include <stdlib.h>
+-#include <limits.h> // PATH_MAX
+ 
+ #include "osal_preproc.h"
+ #include "m64p_types.h"
+diff --git a/src/osal_files.h b/src/osal_files.h
+index 6965bea7924665d75dd34bfb59ae9f844cca6cee..9b464499a50b0d837188981be3c04c3c83579aa4 100644
+--- a/src/osal_files.h
++++ b/src/osal_files.h
+@@ -40,10 +40,15 @@ extern "C" {
+   #include <limits.h>  // for PATH_MAX
+   #define OSAL_DIR_SEPARATOR_STR       "/"
+   #define OSAL_DIR_SEPARATOR_CHAR      '/'
++
++  /* PATH_MAX only may be defined by limits.h */
++  #ifndef PATH_MAX
++    #define PATH_MAX 4096
++  #endif
+ #endif
+ 
+ int osal_is_directory(const char* name);
+-int osal_mkdirp(const char *dirpath, int mode);
++int osal_mkdirp(const char *dirpath, int mode);
+ 
+ void * osal_search_dir_open(const char *pathname);
+ const char *osal_search_dir_read_next(void * dir_handle);
+diff --git a/src/osal_files_unix.c b/src/osal_files_unix.c
+index 2c8c562c488373ce1ed5283d295ee2dce8d895ca..c586f9796d3666a49c6ccb97793805d00be7d51c 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> // PATH_MAX
+ #include <dirent.h>
+ 
+ #include "osal_files.h"
diff --git a/debian/patches/series b/debian/patches/series
index 16e335d..5fed16e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 default-optimisations.patch
 hurd_os.patch
+path_max.patch

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



More information about the Pkg-games-commits mailing list