aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/mdb
diff options
context:
space:
mode:
authorSteven Hartland <smh@FreeBSD.org>2015-01-17 14:44:59 +0000
committerSteven Hartland <smh@FreeBSD.org>2015-01-17 14:44:59 +0000
commitbc96366c864c07ef352edb92017357917c75b36c (patch)
tree09e9633064b6303a8afc6891fff761eb6e399cee /cddl/contrib/opensolaris/cmd/mdb
parentb0b74fb366450ac61b7df38daa92bc19cbfc3ecc (diff)
downloadsrc-bc96366c864c07ef352edb92017357917c75b36c.tar.gz
src-bc96366c864c07ef352edb92017357917c75b36c.zip
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
Notes
Notes: svn path=/head/; revision=277300
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/mdb')
-rw-r--r--cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c8
-rw-r--r--cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
index 602969e1abb3..7bfc06bf2285 100644
--- a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
+++ b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
@@ -40,7 +40,7 @@ die(char *format, ...)
{
va_list ap;
int err = errno;
-#if !defined(sun)
+#ifndef illumos
const char *progname = getprogname();
#endif
@@ -54,7 +54,7 @@ die(char *format, ...)
if (format[strlen(format) - 1] != '\n')
(void) fprintf(stderr, ": %s\n", strerror(err));
-#if defined(__FreeBSD__)
+#ifndef illumos
exit(0);
#else
exit(1);
@@ -65,7 +65,7 @@ void
elfdie(char *format, ...)
{
va_list ap;
-#if !defined(sun)
+#ifndef illumos
const char *progname = getprogname();
#endif
@@ -79,7 +79,7 @@ elfdie(char *format, ...)
if (format[strlen(format) - 1] != '\n')
(void) fprintf(stderr, ": %s\n", elf_errmsg(elf_errno()));
-#if defined(__FreeBSD__)
+#ifndef illumos
exit(0);
#else
exit(1);
diff --git a/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h b/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
index a0932ada0d57..737d2221f62f 100644
--- a/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
+++ b/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
@@ -40,7 +40,7 @@ extern int findelfsecidx(Elf *, char *);
extern void die(char *, ...);
extern void elfdie(char *, ...);
-#if defined(sun)
+#ifdef illumos
extern const char *progname;
#endif