X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fnc_string.h;h=546aa0695ba0279c80dc57270a0905389cfa8526;hp=ce7ccb1280ef11cc3eeb3b66828750bc04f56da2;hb=265e45e43e9917e8b9ecc2bf9d23867a3ede2ecd;hpb=e2e9c09c48b19b24979cafb2d4864f538b5ddd1c diff --git a/include/nc_string.h b/include/nc_string.h index ce7ccb12..546aa069 100644 --- a/include/nc_string.h +++ b/include/nc_string.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2012-2013,2016 Free Software Foundation, Inc. * + * 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 * * copy of this software and associated documentation files (the * @@ -40,7 +41,7 @@ #endif /* - * $Id: nc_string.h,v 1.7 2016/09/10 19:57:15 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. @@ -75,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