acpointerfmt.m4
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:0k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. AC_DEFUN([md_CHECK_POINTER_FMT],
  2. [AC_MSG_CHECKING(for 0x prefix from %p)
  3. AC_TRY_RUN([
  4. #include <stdio.h>
  5. main ()
  6. {
  7.   char buf[16];
  8.   sprintf (buf, "%p", &buf);
  9.   exit (!(*buf == '0' && *(buf + 1) == 'x'));
  10. }
  11. ],
  12. [fmt='%p'; AC_MSG_RESULT(yes)],
  13. [fmt='0x%p'; AC_MSG_RESULT(no)],
  14. [fmt='0x%p'; AC_MSG_RESULT(guessing no)])
  15. AC_DEFINE_UNQUOTED(PTRHEXFMT,"$fmt",[define as format to use for hex pointer])
  16. ])