[Samba] snprintf, vsnprintf
William Jojo
jojowil at hvcc.edu
Thu Jun 26 00:23:07 GMT 2003
On Wed, 25 Jun 2003, William Jojo wrote:
>
> anyway the bug i'm tracking is a failure to expand the macros SAFE_FREE
> and VA_COPY. is compiles fine in AIX 5.1. as soon as i figure that one
> out, i'll forward it.
>
found it. you are penalized in snprintf.c if you have all three of
HAVE_SNPRINTF, HAVE_VSNPRINTF and HAVE_C99_VSNPRINTF by what i believe is
an unnecessary else clause. It will include stdio.h, but will not define
SAFE_FREE and VA_COPY.
AIX 5.1 does not have vsnprintf so it compiles there.
I think this is what the change should be - pardon my misuse if diff, i
would like to know the correct format for submitting patches, but could
not find it during my short search of the site.
*** snprintf.orig Wed Jun 25 19:20:54 2003
--- snprintf.c Wed Jun 25 19:23:31 2003
***************
*** 87,89 ****
! /* make the compiler happy with an empty file */
! void dummy_snprintf(void) {}
! #else
--- 87 ----
! #endif
***************
*** 114 ****
- #endif
--- 111 ----
***************
*** 790 ****
! #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_SNPRINTF)
--- 787 ----
! #if !defined(HAVE_SNPRINTF) || !defined(HAVE_SNPRINTF_DECL)
Bill
More information about the samba
mailing list