Mercurial > mplayer.hg
comparison configure @ 12646:9a495bdc3a1e
string handling security fixes
patch by Nicholas Kain, Alexander Strasser <eclipse7@gmx.net>
reviewed by Pontscho, Alex, Rich
author | diego |
---|---|
date | Fri, 25 Jun 2004 16:49:53 +0000 |
parents | 2c18d6dcc22e |
children | 05d46af5e2bf |
comparison
equal
deleted
inserted
replaced
12645:3841ef14a481 | 12646:9a495bdc3a1e |
---|---|
2710 else | 2710 else |
2711 _def_strsep='#undef HAVE_STRSEP' | 2711 _def_strsep='#undef HAVE_STRSEP' |
2712 fi | 2712 fi |
2713 echores "$_strsep" | 2713 echores "$_strsep" |
2714 | 2714 |
2715 echocheck "strlcpy()" | |
2716 cat > $TMPC << EOF | |
2717 #include <string.h> | |
2718 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; } | |
2719 EOF | |
2720 _strlcpy=no | |
2721 cc_check && _strlcpy=yes | |
2722 if test "$_strlcpy" = yes ; then | |
2723 _def_strlcpy='#define HAVE_STRLCPY 1' | |
2724 else | |
2725 _def_strlcpy='#undef HAVE_STRLCPY' | |
2726 fi | |
2727 echores "$_strlcpy" | |
2728 | |
2729 echocheck "strlcat()" | |
2730 cat > $TMPC << EOF | |
2731 #include <string.h> | |
2732 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; } | |
2733 EOF | |
2734 _strlcat=no | |
2735 cc_check && _strlcat=yes | |
2736 if test "$_strlcat" = yes ; then | |
2737 _def_strlcat='#define HAVE_STRLCAT 1' | |
2738 else | |
2739 _def_strlcat='#undef HAVE_STRLCAT' | |
2740 fi | |
2741 echores "$_strlcat" | |
2742 | |
2715 echocheck "fseeko()" | 2743 echocheck "fseeko()" |
2716 cat > $TMPC << EOF | 2744 cat > $TMPC << EOF |
2717 #include <stdio.h> | 2745 #include <stdio.h> |
2718 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; } | 2746 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; } |
2719 EOF | 2747 EOF |
6334 $_def_scandir | 6362 $_def_scandir |
6335 | 6363 |
6336 /* Define this if your system has strsep */ | 6364 /* Define this if your system has strsep */ |
6337 $_def_strsep | 6365 $_def_strsep |
6338 | 6366 |
6367 /* Define this if your system has strlcpy */ | |
6368 $_def_strlcpy | |
6369 #ifndef HAVE_STRLCPY | |
6370 unsigned int strlcpy (char *dest, char *src, unsigned int size); | |
6371 #endif | |
6372 | |
6373 /* Define this if your system has strlcat */ | |
6374 $_def_strlcat | |
6375 #ifndef HAVE_STRLCAT | |
6376 unsigned int strlcat (char *dest, char *src, unsigned int size); | |
6377 #endif | |
6378 | |
6339 /* Define this if your system has fseeko */ | 6379 /* Define this if your system has fseeko */ |
6340 $_def_fseeko | 6380 $_def_fseeko |
6341 #ifndef HAVE_FSEEKO | 6381 #ifndef HAVE_FSEEKO |
6342 /* Need these for FILE and off_t an config.h is usually before other includes*/ | 6382 /* Need these for FILE and off_t an config.h is usually before other includes*/ |
6343 #include <stdio.h> | 6383 #include <stdio.h> |