From 55c26d898b33386bf97f560dfeaf3b2cdc029c31 Mon Sep 17 00:00:00 2001 From: smh <smh@FreeBSD.org> Date: Sat, 17 Jan 2015 14:44:59 +0000 Subject: Mechanically convert cddl sun #ifdef's to illumos Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay --- cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cddl/contrib/opensolaris/lib/libctf/common') diff --git a/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c b/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c index 5822267..b9f512d 100644 --- a/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c +++ b/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c @@ -34,14 +34,14 @@ #include <unistd.h> #include <fcntl.h> #include <errno.h> -#if defined(sun) +#ifdef illumos #include <dlfcn.h> #else #include <zlib.h> #endif #include <gelf.h> -#if defined(sun) +#ifdef illumos #ifdef _LP64 static const char *_libctf_zlib = "/usr/lib/64/libz.so"; #else @@ -58,7 +58,7 @@ static struct { static size_t _PAGESIZE; static size_t _PAGEMASK; -#if defined(sun) +#ifdef illumos #pragma init(_libctf_init) #else void _libctf_init(void) __attribute__ ((constructor)); @@ -66,7 +66,7 @@ void _libctf_init(void) __attribute__ ((constructor)); void _libctf_init(void) { -#if defined(sun) +#ifdef illumos const char *p = getenv("LIBCTF_DECOMPRESSOR"); if (p != NULL) @@ -87,7 +87,7 @@ _libctf_init(void) void * ctf_zopen(int *errp) { -#if defined(sun) +#ifdef illumos ctf_dprintf("decompressing CTF data using %s\n", _libctf_zlib); if (zlib.z_dlp != NULL) -- cgit v1.1