1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
Author: Thorsten Alteholz <debian@alteholz.de>
Description: define PATH_MAX in case it is not available
this is needed to compile on hurd_i386
--- a/io_lib/cram_index.c
+++ b/io_lib/cram_index.c
@@ -76,6 +76,14 @@
#include "io_lib/os.h"
#include "io_lib/zfio.h"
+/*
+ define PATH_MAX in case it is not available
+ (for example for hurd_i386)
+*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#if 0
static void dump_index_(cram_index *e, int level) {
int i, n;
--- a/io_lib/cram_io.c
+++ b/io_lib/cram_io.c
@@ -107,6 +107,14 @@
#include <stdio_ext.h>
#endif
+/*
+ define PATH_MAX in case it is not available
+ (for example for hurd_i386)
+*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
//#define REF_DEBUG
#ifdef REF_DEBUG
--- a/io_lib/files.c
+++ b/io_lib/files.c
@@ -86,6 +86,14 @@
#include "io_lib/misc.h"
+/*
+ define PATH_MAX in case it is not available
+ (for example for hurd_i386)
+*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
/* Alliant's Concentrix <sys/stat.h> is hugely deficient */
--- a/io_lib/srf.h
+++ b/io_lib/srf.h
@@ -38,6 +38,14 @@
#include "io_lib/ztr.h"
#include "io_lib/mFILE.h"
+/*
+ define PATH_MAX in case it is not available
+ (for example for hurd_i386)
+*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#define SRF_MAGIC "SSRF"
#define SRF_VERSION "1.3"
--- a/progs/cram_index.c
+++ b/progs/cram_index.c
@@ -47,6 +47,14 @@
#include <io_lib/cram.h>
#include <io_lib/zfio.h>
+/*
+ define PATH_MAX in case it is not available
+ (for example for hurd_i386)
+*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
int main(int argc, char **argv) {
cram_fd *fd;
|