fixed wrong initialization in utl-skad.c
This commit is contained in:
parent
0c65ae7eec
commit
c9854dd02c
42
hawk/configure
vendored
42
hawk/configure
vendored
@ -17323,6 +17323,36 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-short-wchar" >&5
|
||||||
|
$as_echo_n "checking whether the compiler supports -fno-short-wchar... " >&6; }
|
||||||
|
if ${ac_cv_cflags__fno_short_wchar+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
|
||||||
|
ac_hawk_try_cflags_saved=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS -fno-short-wchar"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
int main(int argc, char **argv) { return 0; }
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_cflags__fno_short_wchar=yes
|
||||||
|
else
|
||||||
|
ac_cv_cflags__fno_short_wchar=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
CFLAGS=$ac_hawk_try_cflags_saved
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fno_short_wchar" >&5
|
||||||
|
$as_echo "$ac_cv_cflags__fno_short_wchar" >&6; }
|
||||||
|
if test $ac_cv_cflags__fno_short_wchar = yes; then :
|
||||||
|
EXTRACFLAGS="$EXTRACFLAGS -fno-short-wchar"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-largefile was given.
|
# Check whether --enable-largefile was given.
|
||||||
if test "${enable_largefile+set}" = set; then :
|
if test "${enable_largefile+set}" = set; then :
|
||||||
enableval=$enable_largefile;
|
enableval=$enable_largefile;
|
||||||
@ -18354,6 +18384,12 @@ $as_echo "#define HAWK_ENABLE_UNICODE 1" >>confdefs.h
|
|||||||
CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"
|
CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"
|
||||||
CXXFLAGS="$CXXFLAGS -DUNICODE -D_UNICODE"
|
CXXFLAGS="$CXXFLAGS -DUNICODE -D_UNICODE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "${ac_cv_cflags__fno_short_wchar}" = "yes"
|
||||||
|
then
|
||||||
|
CFLAGS="$CFLAGS -fno-short-wchar"
|
||||||
|
CXXFLAGS="$CXXFLAGS -fno-short-wchar"
|
||||||
|
fi
|
||||||
elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes"
|
elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes"
|
||||||
then
|
then
|
||||||
|
|
||||||
@ -18377,6 +18413,12 @@ then
|
|||||||
|
|
||||||
$as_echo "#define HAWK_UNICODE_SIZE 4" >>confdefs.h
|
$as_echo "#define HAWK_UNICODE_SIZE 4" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
if test "${ac_cv_cflags__fno_short_wchar}" = "yes"
|
||||||
|
then
|
||||||
|
CFLAGS="$CFLAGS -fno-short-wchar"
|
||||||
|
CXXFLAGS="$CXXFLAGS -fno-short-wchar"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
|
|
||||||
$as_echo "#define HAWK_UNICODE_SIZE 2" >>confdefs.h
|
$as_echo "#define HAWK_UNICODE_SIZE 2" >>confdefs.h
|
||||||
|
@ -61,7 +61,7 @@ CFLAGS="$CFLAGS -DHAWK_HAVE_CFG_H"
|
|||||||
CXXFLAGS="$CXXFLAGS -DHAWK_HAVE_CFG_H"
|
CXXFLAGS="$CXXFLAGS -DHAWK_HAVE_CFG_H"
|
||||||
|
|
||||||
HAWK_TRY_CFLAGS([-fshort-wchar])
|
HAWK_TRY_CFLAGS([-fshort-wchar])
|
||||||
dnl HAWK_TRY_CFLAGS([-fno-short-wchar])
|
HAWK_TRY_CFLAGS([-fno-short-wchar])
|
||||||
|
|
||||||
dnl make visible the 64-bit interface to the file system
|
dnl make visible the 64-bit interface to the file system
|
||||||
AC_SYS_LARGEFILE()
|
AC_SYS_LARGEFILE()
|
||||||
@ -108,6 +108,12 @@ then
|
|||||||
[CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"]
|
[CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"]
|
||||||
[CXXFLAGS="$CXXFLAGS -DUNICODE -D_UNICODE"]
|
[CXXFLAGS="$CXXFLAGS -DUNICODE -D_UNICODE"]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "${ac_cv_cflags__fno_short_wchar}" = "yes"
|
||||||
|
then
|
||||||
|
[CFLAGS="$CFLAGS -fno-short-wchar"]
|
||||||
|
[CXXFLAGS="$CXXFLAGS -fno-short-wchar"]
|
||||||
|
fi
|
||||||
elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes"
|
elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes"
|
||||||
then
|
then
|
||||||
AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size])
|
AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size])
|
||||||
@ -125,6 +131,12 @@ then
|
|||||||
elif test "${enable_unicode}" = "no:4"
|
elif test "${enable_unicode}" = "no:4"
|
||||||
then
|
then
|
||||||
AC_DEFINE([HAWK_UNICODE_SIZE],[4],[Unicode character type size])
|
AC_DEFINE([HAWK_UNICODE_SIZE],[4],[Unicode character type size])
|
||||||
|
|
||||||
|
if test "${ac_cv_cflags__fno_short_wchar}" = "yes"
|
||||||
|
then
|
||||||
|
[CFLAGS="$CFLAGS -fno-short-wchar"]
|
||||||
|
[CXXFLAGS="$CXXFLAGS -fno-short-wchar"]
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
dnl no:2, no, or anything else
|
dnl no:2, no, or anything else
|
||||||
AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size])
|
AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size])
|
||||||
|
@ -63,6 +63,6 @@ void hawk_clear_skad (hawk_skad_t* _skad)
|
|||||||
{
|
{
|
||||||
hawk_skad_alt_t* skad = (hawk_skad_alt_t*)_skad;
|
hawk_skad_alt_t* skad = (hawk_skad_alt_t*)_skad;
|
||||||
HAWK_ASSERT (HAWK_SIZEOF(*_skad) >= HAWK_SIZEOF(*skad));
|
HAWK_ASSERT (HAWK_SIZEOF(*_skad) >= HAWK_SIZEOF(*skad));
|
||||||
HAWK_MEMSET (skad, 0, HAWK_SIZEOF(skad));
|
HAWK_MEMSET (skad, 0, HAWK_SIZEOF(*skad));
|
||||||
skad->sa.sa_family = HAWK_AF_UNSPEC;
|
skad->sa.sa_family = HAWK_AF_UNSPEC;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user