aboutsummaryrefslogtreecommitdiff
path: root/include/nc_string.h
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2024-06-20 08:11:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2024-06-20 08:11:38 +0000
commit24fa7a5107c5b75d1c197accf0305be64bc72882 (patch)
tree183f09c93417ac0e5f7f49760329a3d2cfaacda9 /include/nc_string.h
parentbf0ab54638a5ef969749f6ceae30e864f9556ea8 (diff)
Diffstat (limited to 'include/nc_string.h')
-rw-r--r--include/nc_string.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/nc_string.h b/include/nc_string.h
index 93cf201507c7..546aa0695ba0 100644
--- a/include/nc_string.h
+++ b/include/nc_string.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 2012-2013,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -41,7 +41,7 @@
#endif
/*
- * $Id: nc_string.h,v 1.8 2020/02/02 23:34:34 tom Exp $
+ * $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
*
* String-hacks. Use these macros to stifle warnings on (presumably) correct
* uses of strcat, strcpy and sprintf.
@@ -76,7 +76,11 @@
#endif
#if USE_STRING_HACKS && HAVE_SNPRINTF
+#ifdef __cplusplus
#define _nc_SPRINTF NCURSES_VOID snprintf
+#else
+#define _nc_SPRINTF NCURSES_VOID (snprintf)
+#endif
#define _nc_SLIMIT(n) NCURSES_CAST(size_t,n),
#else
#define _nc_SPRINTF NCURSES_VOID sprintf