diff options
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/posix/posix_debug.c | 12 | ||||
| -rw-r--r-- | src/platform/windows/win_debug.c | 11 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/platform/posix/posix_debug.c b/src/platform/posix/posix_debug.c index 7619e8e8..80f37225 100644 --- a/src/platform/posix/posix_debug.c +++ b/src/platform/posix/posix_debug.c @@ -1,5 +1,5 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -12,6 +12,7 @@ #ifdef NNG_PLATFORM_POSIX #include <errno.h> +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -23,6 +24,15 @@ nni_plat_abort(void) } void +nni_plat_printf(const char *fmt, ...) +{ + va_list ap; + va_start(ap, ap); + (void) vprintf(fmt, ap); + va_end(ap); +} + +void nni_plat_println(const char *message) { fputs(message, stderr); diff --git a/src/platform/windows/win_debug.c b/src/platform/windows/win_debug.c index a47e7b41..a37411cf 100644 --- a/src/platform/windows/win_debug.c +++ b/src/platform/windows/win_debug.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -24,6 +24,15 @@ nni_plat_abort(void) } void +nni_plat_printf(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + (void) vprintf(fmt, ap); + va_end(ap); +} + +void nni_plat_println(const char *message) { (void) fprintf(stderr, "%s\n", message); |
