NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/50166
The following reply was made to PR misc/50166; it has been noted by GNATS.
From: Robert Millan <rmh%gnu.org@localhost>
To: Antti Kantee <pooka%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, misc-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: misc/50166
Date: Mon, 21 Sep 2015 22:37:13 +0200
This is a multi-part message in MIME format.
--------------030703000301090409070001
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
El 20/09/15 a les 14:48, Antti Kantee ha escrit:
> We can address make separately too if need be. Do you still need the bits in compat/{Makefile,defs.mk.in}? Can those be addressed by using compat_defs.h instead of hardcoding the values based on uname -s? Or does that require including nbtool_config.h from a large number of .c files?
As you suggested, I took a closer inspection by disabling all the generic -D flags and
using nbtool_config.h instead.
Then I added back only the defines that were needed in the corresponding individual
files.
The result is much smaller than I expected. In fact, other than make (because of the
bootstrap issue) and some Rump components, all remaining MAXPATHLEN/etc issues are
handled by nbtool_config.h.
Please consider attached patch.
--
Robert Millan
--------------030703000301090409070001
Content-Type: text/x-patch;
name="limits.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="limits.diff"
Index: rumpkernel/buildrump.sh/src/usr.bin/make/make.h
===================================================================
--- rumpkernel.orig/buildrump.sh/src/usr.bin/make/make.h
+++ rumpkernel/buildrump.sh/src/usr.bin/make/make.h
@@ -503,4 +503,10 @@ int str2Lst_Append(Lst, char *, const ch
#define MAX(a, b) ((a > b) ? a : b)
#endif
+/* GNU/Hurd systems lack MAXPATHLEN */
+#include <limits.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
#endif /* _MAKE_H_ */
Index: rumpkernel/buildrump.sh/src/tools/compat/compat_defs.h
===================================================================
--- rumpkernel.orig/buildrump.sh/src/tools/compat/compat_defs.h
+++ rumpkernel/buildrump.sh/src/tools/compat/compat_defs.h
@@ -1201,6 +1201,17 @@ __GEN_ENDIAN_DEC(64, le)
#define LINE_MAX 2048
#endif
+/* GNU/Hurd systems lack MAXPATHLEN (aka PATH_MAX) and MAXHOSTNAMELEN */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX MAXPATHLEN
+#endif
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif
+
/* <sys/time.h> */
#ifndef timercmp
Index: rumpkernel/buildrump.sh/src/sys/rump/include/rump/rumpuser.h
===================================================================
--- rumpkernel.orig/buildrump.sh/src/sys/rump/include/rump/rumpuser.h
+++ rumpkernel/buildrump.sh/src/sys/rump/include/rump/rumpuser.h
@@ -251,4 +251,8 @@ int rumpuser_sp_raise(void *, int);
void rumpuser_sp_fini(void *);
#endif /* _RUMP_SYSPROXY || LIBRUMPUSER */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif
+
#endif /* _RUMP_RUMPUSER_H_ */
Index: rumpkernel/buildrump.sh/src/lib/librumpuser/sp_common.c
===================================================================
--- rumpkernel.orig/buildrump.sh/src/lib/librumpuser/sp_common.c
+++ rumpkernel/buildrump.sh/src/lib/librumpuser/sp_common.c
@@ -64,6 +64,10 @@
#define __unused __attribute__((__unused__))
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
//#define DEBUG
#ifdef DEBUG
#define DPRINTF(x) mydprintf x
Index: rumpkernel/buildrump.sh/src/usr.bin/rump_allserver/rump_allserver.c
===================================================================
--- rumpkernel.orig/buildrump.sh/src/usr.bin/rump_allserver/rump_allserver.c
+++ rumpkernel/buildrump.sh/src/usr.bin/rump_allserver/rump_allserver.c
@@ -50,6 +50,10 @@ __RCSID("$NetBSD: rump_allserver.c,v 1.3
#include <rump/rumpdefs.h>
#include <rump/rumperr.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
__dead static void
usage(void)
{
--------------030703000301090409070001--
Home |
Main Index |
Thread Index |
Old Index