From bfb288c292363d0bf1ce8fc4ebc105acf023f766 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 10 Oct 2013 23:43:04 +0000 Subject: On __sun, use , BE_64(x), and . Thanks to Thomas Klausner for providing failing SmartOS build logs such that i could write this patch without access to a __sun system and for confirming that these patches help. --- apropos_db.c | 17 +++++++++++------ config.h.post | 3 +++ mandocdb.c | 20 +++++++++++--------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/apropos_db.c b/apropos_db.c index 1ec3c9c2..786fc7bd 100644 --- a/apropos_db.c +++ b/apropos_db.c @@ -1,4 +1,4 @@ -/* $Id: apropos_db.c,v 1.32.2.2 2013/10/05 20:30:05 schwarze Exp $ */ +/* $Id: apropos_db.c,v 1.32.2.3 2013/10/10 23:43:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -30,14 +30,19 @@ #include #include -#if defined(__linux__) -# include -# include -#elif defined(__APPLE__) +#if defined(__APPLE__) # include -# include +#elif defined(__linux__) +# include +#elif defined(__sun) +# include #else # include +#endif + +#if defined(__linux__) || defined(__sun) +# include +#else # include #endif diff --git a/config.h.post b/config.h.post index cee82aa1..9a33671b 100644 --- a/config.h.post +++ b/config.h.post @@ -19,6 +19,9 @@ # if defined(__APPLE__) # define betoh64(x) OSSwapBigToHostInt64(x) # define htobe64(x) OSSwapHostToBigInt64(x) +# elif defined(__sun) +# define betoh64(x) BE_64(x) +# define htobe64(x) BE_64(x) # else # define betoh64(x) be64toh(x) # endif diff --git a/mandocdb.c b/mandocdb.c index eb0b5052..c56a2b36 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.49.2.8 2013/10/05 20:30:05 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.49.2.9 2013/10/10 23:43:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze @@ -34,19 +34,21 @@ #include #include -#if defined(__linux__) || defined(__sun) -# include -# include -#elif defined(__APPLE__) +#if defined(__APPLE__) # include -# include +#elif defined(__linux__) +# include +#elif defined(__sun) +# include +# include #else # include -# include #endif -#if defined(__sun) -#include +#if defined(__linux__) || defined(__sun) +# include +#else +# include #endif #include "man.h" -- cgit v1.2.3-56-ge451