Welcome! Log In Create A New Profile

Advanced

[nginx] Configure: GNU Hurd properly recognized.

Maxim Dounin
May 25, 2015 11:02AM
details: http://hg.nginx.org/nginx/rev/a88e309f839b
branches:
changeset: 6156:a88e309f839b
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon May 25 17:58:13 2015 +0300
description:
Configure: GNU Hurd properly recognized.

With this change it's no longer needed to pass -D_GNU_SOURCE manually,
and -D_FILE_OFFSET_BITS=64 is set to use 64-bit off_t.

Note that nginx currently fails to work properly with master process
enabled on GNU Hurd, as fcntl(F_SETOWN) returns EOPNOTSUPP for sockets
as of GNU Hurd 0.6. Additionally, our strerror() preloading doesn't
work well with GNU Hurd, as it uses large numbers for most errors.

diffstat:

auto/os/conf | 9 +++++++++
src/os/unix/ngx_posix_config.h | 8 ++++++++
2 files changed, 17 insertions(+), 0 deletions(-)

diffs (37 lines):

diff --git a/auto/os/conf b/auto/os/conf
--- a/auto/os/conf
+++ b/auto/os/conf
@@ -60,6 +60,15 @@ case "$NGX_PLATFORM" in
CORE_SRCS="$UNIX_SRCS"
;;

+ GNU:*)
+ # GNU Hurd
+ have=NGX_GNU_HURD . auto/have_headers
+ CORE_INCS="$UNIX_INCS"
+ CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
+ CORE_SRCS="$UNIX_SRCS"
+ CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
+ ;;
+
*)
CORE_INCS="$UNIX_INCS"
CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h
--- a/src/os/unix/ngx_posix_config.h
+++ b/src/os/unix/ngx_posix_config.h
@@ -21,6 +21,14 @@
#endif


+#if (NGX_GNU_HURD)
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* accept4() */
+#endif
+#define _FILE_OFFSET_BITS 64
+#endif
+
+
#ifdef __CYGWIN__
#define timezonevar /* timezone is variable */
#define NGX_BROKEN_SCM_RIGHTS 1

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Configure: GNU Hurd properly recognized.

Maxim Dounin 533 May 25, 2015 11:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 212
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready