define_PATH_MAX
authorDebian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Fri, 4 Nov 2016 11:58:19 +0000 (11:58 +0000)
committerAndreas Tille <tille@debian.org>
Fri, 4 Nov 2016 11:58:19 +0000 (11:58 +0000)
Gbp-Pq: Name define_PATH_MAX.patch

cram/open_trace_file.c
cram/os.h

index 62f40875e0d1c974c17f415d9b7fec08a6c99cfe..07adc0946a87c63a7ce678adf466775392d106f3 100644 (file)
@@ -72,9 +72,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "cram/os.h"
-#ifndef PATH_MAX
-#  define PATH_MAX 1024
-#endif
 
 #include "cram/open_trace_file.h"
 #include "cram/misc.h"
index 22d80964905b7bb995c0386f7ac6be2cd42ca34c..88f3dffe3a2aff50ba09a9b4edd39addcfe099d3 100644 (file)
--- a/cram/os.h
+++ b/cram/os.h
@@ -153,6 +153,13 @@ extern "C" {
 
 #endif
 
+/*
+ * in case PATH_MAX is not defined (like in hurd)
+ */
+#ifndef PATH_MAX
+#  define PATH_MAX 1024
+#endif
+
 /*-----------------------------------------------------------------------------
  * Allow for unaligned memory access. This is used in BAM code as the packed
  * structure has 4-byte cigar ints after the variable length name.