mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
A fix for bug 174. I'm pushing this to the tree to test it on one of
the build farm machines that I don't have direct access to (hpntc9I). (This used to be commit b01965823341bbabb74dcbc09d379b43db2ec680)
This commit is contained in:
parent
0c72828e3d
commit
8991cecd54
@ -1232,6 +1232,14 @@ int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
|
||||
int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
#endif
|
||||
|
||||
/* Fix prototype problem with non-C99 compliant snprintf implementations, esp
|
||||
HPUX 11. Don't change the sense of this #if statement. Read the comments
|
||||
in lib/snprint.c if you think you need to. See also bugzilla bug 174. */
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
|
||||
#define snprintf smb_snprintf
|
||||
#endif
|
||||
|
||||
void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
|
||||
int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
|
@ -823,12 +823,10 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
*
|
||||
* The logic for these two is that we need our own definition if the
|
||||
* OS *either* has no definition of *sprintf, or if it does have one
|
||||
* that doesn't work properly according to the autoconf test. Perhaps
|
||||
* these should really be smb_snprintf to avoid conflicts with buggy
|
||||
* linkers? -- mbp
|
||||
* that doesn't work properly according to the autoconf test.
|
||||
*/
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
|
||||
int snprintf(char *str,size_t count,const char *fmt,...)
|
||||
int smb_snprintf(char *str,size_t count,const char *fmt,...)
|
||||
{
|
||||
size_t ret;
|
||||
va_list ap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user