[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#line problem
From: |
Werner LEMBERG |
Subject: |
#line problem |
Date: |
Tue, 28 Jan 2003 23:09:40 +0100 (CET) |
Consider the following:
AC_DEFUN(GROFF_SRAND, [
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([for return type of srand])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <stdlib.h>
extern "C" { void srand(unsigned int); }
]])
], [
AC_MSG_RESULT(void)
AC_DEFINE(RET_TYPE_SRAND_IS_VOID, 1,
[Define if srand() returns void not int.])
], [
AC_MSG_RESULT(int)
])
AC_LANG_POP(C++)
])
Look how `AC_LANG_PROGRAM' is indented by four spaces. After macro
expansion, you get
#line $LINENO "configure"
/* confdefs.h. */
...
which is incorrect, of course. I think the start of
AC_LANG_SOURCE(C) in c.m4 shouldn't be
m4_define([AC_LANG_SOURCE(C)],
[#line $LINENO "configure"
/* confdefs.h. */
but
m4_define([AC_LANG_SOURCE(C)],[
#line $LINENO "configure"
/* confdefs.h. */
to protect against indentation.
Werner
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- #line problem,
Werner LEMBERG <=