Bugzilla – Attachment 1043 Details for
Bug 1133
snprintf replacement function has conflicting type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
configure test for SNPRINTF_CONST
x (text/plain), 1.38 KB, created by
David Leonard
on 2005-12-16 12:53:25 AEDT
(
hide
)
Description:
configure test for SNPRINTF_CONST
Filename:
MIME Type:
Creator:
David Leonard
Created:
2005-12-16 12:53:25 AEDT
Size:
1.38 KB
patch
obsolete
>*** ../openssh.orig/configure.ac Tue Nov 29 13:40:34 2005 >--- configure.ac Fri Dec 16 12:50:49 2005 >*************** >*** 1341,1346 **** >--- 1341,1360 ---- > ) > fi > >+ # On systems where [v]snprintf is broken, but is declared in stdio, >+ # check that the fmt argument is const char * or just char *. >+ # This is only useful for when BROKEN_SNPRINTF >+ AC_MSG_CHECKING([whether snprintf can declare const char *fmt]) >+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> >+ int snprintf(char *a, size_t b, const char *c, ...) { return 0; } >+ int main(void) { snprintf(0, 0, 0); } >+ ]])], >+ [AC_MSG_RESULT(yes) >+ AC_DEFINE(SNPRINTF_CONST, [const], >+ [Define as const if snprintf() can declare const char *fmt])], >+ [AC_MSG_RESULT(no) >+ AC_DEFINE(SNPRINTF_CONST, [/* not const */])]) >+ > # Check for missing getpeereid (or equiv) support > NO_PEERCHECK="" > if test "x$ac_cv_func_getpeereid" != "xyes" ; then >*** ../openssh.orig/openbsd-compat/bsd-snprintf.c Thu Nov 24 19:58:21 2005 >--- openbsd-compat/bsd-snprintf.c Fri Dec 16 12:51:45 2005 >*************** >*** 788,794 **** > #endif > > #if !defined(HAVE_SNPRINTF) >! int snprintf(char *str,size_t count,const char *fmt,...) > { > size_t ret; > va_list ap; >--- 788,794 ---- > #endif > > #if !defined(HAVE_SNPRINTF) >! int snprintf(char *str, size_t count, SNPRINTF_CONST char *fmt, ...) > { > size_t ret; > va_list ap;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1133
:
1042
| 1043