diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-05-07 20:26:05 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-05-07 20:26:05 -0700 |
| commit | 2b87c219ca07aebcf6e8ff02009dca88babc04c3 (patch) | |
| tree | c4d727615f01748280b93f3abc99ac3a6c7eb488 /src/core/platform.h | |
| parent | c036b3e4a365a966215e383c1130c66d96aa917b (diff) | |
| download | nng-2b87c219ca07aebcf6e8ff02009dca88babc04c3.tar.gz nng-2b87c219ca07aebcf6e8ff02009dca88babc04c3.tar.bz2 nng-2b87c219ca07aebcf6e8ff02009dca88babc04c3.zip | |
Introduce nni_plat_printf()
This permits the stats dump to avoid some extra buffering,
and resolves a complaint about possible format buffer overruns.
Diffstat (limited to 'src/core/platform.h')
| -rw-r--r-- | src/core/platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/platform.h b/src/core/platform.h index e415b438..1418ba4f 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -52,6 +52,11 @@ extern void nni_plat_abort(void); // not contain newlines, but the output will add them. extern void nni_plat_println(const char *); +// nni_plat_printf is like printf. It should conform to C99 standard printf, +// but is a function to allow platform ports to redirect. It should go to +// the same place that nni_plat_println does. +extern void nni_plat_printf(const char *, ...); + // nni_plat_strerror allows the platform to use additional error messages // for additional error codes. The err code passed in should be the // equivalent of errno or GetLastError, without the NNG_ESYSERR component. |
