summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r--usr/src/lib/libc/port/mapfile-vers7
-rw-r--r--usr/src/lib/libc/port/threads/assfail.c19
2 files changed, 25 insertions, 1 deletions
diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers
index c2313fc09e..9dc147a35b 100644
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -24,7 +24,7 @@
# Copyright 2010 Nexenta Systems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright (c) 2011 by Delphix. All rights reserved.
+# Copyright (c) 2012 by Delphix. All rights reserved.
#
#
@@ -90,6 +90,11 @@ $if _x86 && _ELF64
$add amd64
$endif
+SYMBOL_VERSION ILLUMOS_0.3 { # Illumos additions
+ protected:
+ assfail3;
+} ILLUMOS_0.2;
+
SYMBOL_VERSION ILLUMOS_0.2 { # Illumos additions
protected:
posix_spawn_pipe_np;
diff --git a/usr/src/lib/libc/port/threads/assfail.c b/usr/src/lib/libc/port/threads/assfail.c
index 8a6440abc2..7cf0ea98e6 100644
--- a/usr/src/lib/libc/port/threads/assfail.c
+++ b/usr/src/lib/libc/port/threads/assfail.c
@@ -23,6 +23,9 @@
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
#include "lint.h"
#include "thr_uberdata.h"
@@ -442,3 +445,19 @@ assfail(const char *assertion, const char *filename, int line_num)
{
__assfail(assertion, filename, line_num);
}
+
+void
+assfail3(const char *assertion, uintmax_t lv, const char *op, uintmax_t rv,
+ const char *filename, int line_num)
+{
+ char buf[1000];
+ (void) strcpy(buf, assertion);
+ (void) strcat(buf, " (0x");
+ ultos((uint64_t)lv, 16, buf + strlen(buf));
+ (void) strcat(buf, " ");
+ (void) strcat(buf, op);
+ (void) strcat(buf, " 0x");
+ ultos((uint64_t)rv, 16, buf + strlen(buf));
+ (void) strcat(buf, ")");
+ __assfail(buf, filename, line_num);
+}