2010-07-22 Jonathan Yong <jon_y@users.sourceforge.net>

*src/gendef.c (decode_mangle): Rename sGcCtx to libmangle_gc_context.
        Rename pMToken to libmangle_tokens.
        Rename decode_ms_name to libmangle_decode_ms_name.



git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@2920 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
Jonathan Yong 2010-07-22 09:58:17 +00:00
parent b145d3b109
commit 2f363623c7
4 changed files with 26 additions and 20 deletions

View File

@ -1,3 +1,9 @@
2010-07-22 Jonathan Yong <jon_y@users.sourceforge.net>
*src/gendef.c (decode_mangle): Rename sGcCtx to libmangle_gc_context.
Rename pMToken to libmangle_tokens.
Rename decode_ms_name to libmangle_decode_ms_name.
2010-05-01 Jonathan Yong <jon_y@users.sourceforge.net>
* src/fsredir.h (doredirect): Declare.

View File

@ -1734,11 +1734,11 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
test_array [0] = 0
;
@ -1749,11 +1749,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
< ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
test_array [0] = 0
@ -4332,9 +4332,9 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for print_decl in -lmangle" >&5
$as_echo_n "checking for print_decl in -lmangle... " >&6; }
if test "${ac_cv_lib_mangle_print_decl+set}" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmangle_print_decl in -lmangle" >&5
$as_echo_n "checking for libmangle_print_decl in -lmangle... " >&6; }
if test "${ac_cv_lib_mangle_libmangle_print_decl+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@ -4348,27 +4348,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
char print_decl ();
char libmangle_print_decl ();
int
main ()
{
return print_decl ();
return libmangle_print_decl ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_mangle_print_decl=yes
ac_cv_lib_mangle_libmangle_print_decl=yes
else
ac_cv_lib_mangle_print_decl=no
ac_cv_lib_mangle_libmangle_print_decl=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mangle_print_decl" >&5
$as_echo "$ac_cv_lib_mangle_print_decl" >&6; }
if test "x$ac_cv_lib_mangle_print_decl" = x""yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mangle_libmangle_print_decl" >&5
$as_echo "$ac_cv_lib_mangle_libmangle_print_decl" >&6; }
if test "x$ac_cv_lib_mangle_libmangle_print_decl" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMANGLE 1
_ACEOF

View File

@ -32,7 +32,7 @@ AS_VAR_IF([with_mangle_result],[yes],[
CPPFLAGS="-I$with_mangle_path/include $CPPFLAGS"
LDFLAGS="-L$with_mangle_path/lib $LDFLAGS"])
AC_CHECK_HEADER([libmangle.h],[],[AC_MSG_ERROR([libmangle enabled, but the header is not usable.])])
AC_CHECK_LIB([mangle],[print_decl],[],[AC_MSG_ERROR([libmangle enabled, but the library is not usable.])])])
AC_CHECK_LIB([mangle],[libmangle_print_decl],[],[AC_MSG_ERROR([libmangle enabled, but the library is not usable.])])])
# Checks for header files.
AC_CHECK_HEADERS([inttypes.h memory.h stdint.h stdlib.h string.h])

View File

@ -1165,22 +1165,22 @@ static void
decode_mangle (FILE *fp, const char *n)
{
#ifdef HAVE_LIBMANGLE
sGcCtx *gc = generate_gc ();
pMToken ptok;
libmangle_gc_context *gc = libmangle_generate_gc ();
libmangle_tokens ptok;
#endif
if (!fp || !n || *n == 0)
return;
#ifdef HAVE_LIBMANGLE
ptok = decode_ms_name (gc, n);
ptok = libmangle_decode_ms_name (gc, n);
if (ptok)
{
char *h = sprint_decl (ptok);
char *h = libmangle_sprint_decl (ptok);
if (h)
{
fprintf (fp, "; %s\n", h);
free (h);
}
}
release_gc (gc);
libmangle_release_gc (gc);
#endif
}