This commit is contained in:
parent
b212e413bd
commit
a2d5d649ba
62
ase/configure
vendored
62
ase/configure
vendored
@ -24663,9 +24663,9 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for void*" >&5
|
||||
echo $ECHO_N "checking for void*... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_type_voidp+set}" = set; then
|
||||
{ echo "$as_me:$LINENO: checking for void *" >&5
|
||||
echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_type_void_p+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
@ -24675,7 +24675,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_new_;
|
||||
typedef void * ac__type_new_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24704,26 +24704,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
ac_cv_type_voidp=yes
|
||||
ac_cv_type_void_p=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_type_voidp=no
|
||||
ac_cv_type_void_p=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5
|
||||
echo "${ECHO_T}$ac_cv_type_voidp" >&6; }
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
|
||||
echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
|
||||
|
||||
# The cast to long int works around a bug in the HP C Compiler
|
||||
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
|
||||
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
|
||||
# This bug is HP SR number 8606223364.
|
||||
{ echo "$as_me:$LINENO: checking size of void*" >&5
|
||||
echo $ECHO_N "checking size of void*... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_sizeof_voidp+set}" = set; then
|
||||
{ echo "$as_me:$LINENO: checking size of void *" >&5
|
||||
echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_sizeof_void_p+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
@ -24735,7 +24735,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24772,7 +24772,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24826,7 +24826,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24863,7 +24863,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24927,7 +24927,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -24966,15 +24966,15 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
case $ac_lo in
|
||||
?*) ac_cv_sizeof_voidp=$ac_lo;;
|
||||
'') if test "$ac_cv_type_voidp" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void*)
|
||||
?*) ac_cv_sizeof_void_p=$ac_lo;;
|
||||
'') if test "$ac_cv_type_void_p" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot compute sizeof (void*)
|
||||
echo "$as_me: error: cannot compute sizeof (void *)
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 77); exit 77; }; }
|
||||
else
|
||||
ac_cv_sizeof_voidp=0
|
||||
ac_cv_sizeof_void_p=0
|
||||
fi ;;
|
||||
esac
|
||||
else
|
||||
@ -24985,7 +24985,7 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
typedef void* ac__type_sizeof_;
|
||||
typedef void * ac__type_sizeof_;
|
||||
static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
|
||||
static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
|
||||
#include <stdio.h>
|
||||
@ -25037,34 +25037,34 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_sizeof_voidp=`cat conftest.val`
|
||||
ac_cv_sizeof_void_p=`cat conftest.val`
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
if test "$ac_cv_type_voidp" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void*)
|
||||
if test "$ac_cv_type_void_p" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot compute sizeof (void*)
|
||||
echo "$as_me: error: cannot compute sizeof (void *)
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 77); exit 77; }; }
|
||||
else
|
||||
ac_cv_sizeof_voidp=0
|
||||
ac_cv_sizeof_void_p=0
|
||||
fi
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.val
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5
|
||||
echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6; }
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
|
||||
echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
|
||||
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
|
||||
_ACEOF
|
||||
|
||||
|
||||
@ -26790,7 +26790,7 @@ else
|
||||
enable_wchar_is=yes
|
||||
fi
|
||||
|
||||
"${ac_cv_sizeof_wchar_t}" = "0" && enable_wchar_is=no
|
||||
test "${ac_cv_sizeof_wchar_t}" = "0" && enable_wchar_is=no
|
||||
if test "$enable_wchar_is" = "yes"
|
||||
then
|
||||
|
||||
|
@ -93,7 +93,8 @@ AC_CHECK_SIZEOF(__int16)
|
||||
AC_CHECK_SIZEOF(__int32)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
AC_CHECK_SIZEOF(__int128)
|
||||
AC_CHECK_SIZEOF(void*)
|
||||
dnl AC_CHECK_SIZEOF doesn't work without white-space between void and *
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(float)
|
||||
AC_CHECK_SIZEOF(double)
|
||||
AC_CHECK_SIZEOF(long double)
|
||||
@ -124,7 +125,7 @@ AC_DEFINE_UNQUOTED(ASE_PKGAUTHOR,"${PACKAGE_BUGREPORT}", [author's email address
|
||||
AC_ARG_ENABLE([wchar], [AC_HELP_STRING([--enable-wchar],
|
||||
[use wchar_t a default charater type when enabled (default. yes)])],
|
||||
enable_wchar_is=$enableval,enable_wchar_is=yes)
|
||||
[ "${ac_cv_sizeof_wchar_t}" = "0" ] && enable_wchar_is=no
|
||||
test "${ac_cv_sizeof_wchar_t}" = "0" && enable_wchar_is=no
|
||||
if test "$enable_wchar_is" = "yes"
|
||||
then
|
||||
AC_DEFINE([ASE_CHAR_IS_WCHAR],[],[char is wchar])
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.h 271 2008-07-20 12:42:39Z baconevi $
|
||||
* $Id: awk.h 278 2008-07-21 03:49:09Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -603,7 +603,9 @@ ase_awk_t* ase_awk_open (
|
||||
/* memory manager */
|
||||
ase_mmgr_t* mmgr,
|
||||
/* size of extension area to allocate in bytes */
|
||||
unsigned int extension
|
||||
ase_size_t extension,
|
||||
/* memory manager fuser */
|
||||
ase_fuser_t mmgr_fuser
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -147,8 +147,8 @@
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of `void*', as computed by sizeof. */
|
||||
#undef SIZEOF_VOIDP
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#undef SIZEOF_WCHAR_T
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: types.h 225 2008-06-26 06:48:38Z baconevi $
|
||||
* $Id: types.h 278 2008-07-21 03:49:09Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -314,6 +314,10 @@ typedef int ase_mcint_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* a fuser should fuse(copy and combine) the orginal data into the given space
|
||||
* and return the pointer to its new location in the space */
|
||||
typedef void* (*ase_fuser_t) (void* org, void* space, ase_size_t size);
|
||||
|
||||
typedef struct ase_cstr_t ase_cstr_t;
|
||||
typedef struct ase_mmgr_t ase_mmgr_t;
|
||||
typedef struct ase_ccls_t ase_ccls_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.c 276 2008-07-20 13:52:30Z baconevi $
|
||||
* $Id: awk.c 278 2008-07-21 03:49:09Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -24,7 +24,8 @@ static void free_bfn (void* awk, void* afn);
|
||||
ase_awk_seterror ((awk), (code), (line), &errarg, 1); \
|
||||
} while (0)
|
||||
|
||||
ase_awk_t* ase_awk_open (ase_mmgr_t* mmgr, unsigned int extension, extension_initializer)
|
||||
ase_awk_t* ase_awk_open (
|
||||
ase_mmgr_t* mmgr, ase_size_t extension, ase_fuser_t mmgr_fuser)
|
||||
{
|
||||
ase_awk_t* awk;
|
||||
|
||||
@ -36,12 +37,9 @@ ase_awk_t* ase_awk_open (ase_mmgr_t* mmgr, unsigned int extension, extension_ini
|
||||
if (awk == ASE_NULL) return ASE_NULL;
|
||||
|
||||
ase_memset (awk, 0, ASE_SIZEOF(ase_awk_t) + extension);
|
||||
if (mmgr_fuser) mmgr = mmgr_fuser (mmgr, awk + 1, extension);
|
||||
awk->mmgr = mmgr;
|
||||
|
||||
// TODO: extension_initializer???????????????????????????????/
|
||||
if (extension_initializer)
|
||||
extension_initializer (awk, awk + 1, extension);
|
||||
|
||||
if (ase_str_open (&awk->token.name, 128, mmgr) == ASE_NULL)
|
||||
{
|
||||
ASE_AWK_FREE (awk, awk);
|
||||
|
Loading…
Reference in New Issue
Block a user