comparison configure @ 23703:9fb716ab06a3

Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy instead of plain strlcat/strlcpy
author reimar
date Thu, 05 Jul 2007 22:01:07 +0000
parents 528616078af2
children 088fa7bde511
comparison
equal deleted inserted replaced
23702:5159b5f8784e 23703:9fb716ab06a3
3392 _def_strsep='#undef HAVE_STRSEP' 3392 _def_strsep='#undef HAVE_STRSEP'
3393 _need_strsep=yes 3393 _need_strsep=yes
3394 fi 3394 fi
3395 echores "$_strsep" 3395 echores "$_strsep"
3396 3396
3397 echocheck "strlcpy()"
3398 cat > $TMPC << EOF
3399 #include <string.h>
3400 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3401 EOF
3402 _strlcpy=no
3403 cc_check && _strlcpy=yes
3404 if test "$_strlcpy" = yes ; then
3405 _def_strlcpy='#define HAVE_STRLCPY 1'
3406 _need_strlcpy=no
3407 else
3408 _def_strlcpy='#undef HAVE_STRLCPY'
3409 _need_strlcpy=yes
3410 fi
3411 echores "$_strlcpy"
3412
3413 echocheck "strlcat()"
3414 cat > $TMPC << EOF
3415 #include <string.h>
3416 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3417 EOF
3418 _strlcat=no
3419 cc_check && _strlcat=yes
3420 if test "$_strlcat" = yes ; then
3421 _def_strlcat='#define HAVE_STRLCAT 1'
3422 _need_strlcat=no
3423 else
3424 _def_strlcat='#undef HAVE_STRLCAT'
3425 _need_strlcat=yes
3426 fi
3427 echores "$_strlcat"
3428
3429 echocheck "fseeko()" 3397 echocheck "fseeko()"
3430 cat > $TMPC << EOF 3398 cat > $TMPC << EOF
3431 #include <stdio.h> 3399 #include <stdio.h>
3432 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; } 3400 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3433 EOF 3401 EOF
7497 NEED_GETTIMEOFDAY = $_need_gettimeofday 7465 NEED_GETTIMEOFDAY = $_need_gettimeofday
7498 NEED_GLOB = $_need_glob 7466 NEED_GLOB = $_need_glob
7499 NEED_SCANDIR = $_need_scandir 7467 NEED_SCANDIR = $_need_scandir
7500 NEED_SETENV = $_need_setenv 7468 NEED_SETENV = $_need_setenv
7501 NEED_SHMEM = $_need_shmem 7469 NEED_SHMEM = $_need_shmem
7502 NEED_STRLCAT = $_need_strlcat
7503 NEED_STRLCPY = $_need_strlcpy
7504 NEED_STRSEP = $_need_strsep 7470 NEED_STRSEP = $_need_strsep
7505 NEED_SWAB = $_need_swab 7471 NEED_SWAB = $_need_swab
7506 NEED_VSSCANF = $_need_vsscanf 7472 NEED_VSSCANF = $_need_vsscanf
7507 7473
7508 # for FFmpeg 7474 # for FFmpeg
7866 $_def_scandir 7832 $_def_scandir
7867 7833
7868 /* Define this if your system has strsep */ 7834 /* Define this if your system has strsep */
7869 $_def_strsep 7835 $_def_strsep
7870 7836
7871 /* Define this if your system has strlcpy */
7872 $_def_strlcpy
7873 #ifndef HAVE_STRLCPY
7874 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7875 #endif
7876
7877 /* Define this if your system has strlcat */
7878 $_def_strlcat
7879 #ifndef HAVE_STRLCAT
7880 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7881 #endif
7882
7883 /* Define this if your system has fseeko */ 7837 /* Define this if your system has fseeko */
7884 $_def_fseeko 7838 $_def_fseeko
7885 #ifndef HAVE_FSEEKO 7839 #ifndef HAVE_FSEEKO
7886 /* Need these for FILE and off_t an config.h is usually before other includes*/ 7840 /* Need these for FILE and off_t an config.h is usually before other includes*/
7887 #include <stdio.h> 7841 #include <stdio.h>