[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Lynx 2.8.8rel.2 patch: aclocal.m4 AC_CHECK_SIZEOF
From: |
Thomas Dickey |
Subject: |
Re: [Lynx-dev] Lynx 2.8.8rel.2 patch: aclocal.m4 AC_CHECK_SIZEOF |
Date: |
Sat, 9 May 2015 10:48:53 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, May 08, 2015 at 06:39:12PM -0400, Andrew Arensburger wrote:
> Short version: I'm attaching a patch for aclocal.m4, but
> please proofread it to make sure it does the right thing.
>
> Longer version:
> Hi! I just tried building Lynx 2.8.8rel.2, and got error
> messages similar to the ones in:
> https://lists.nongnu.org/archive/html/lynx-dev/2010-09/msg00000.html
>
> specifically, "has no left operand" errors like:
>
> ../../../WWW/Library/Implementation/HTUtils.h:534:19: error: operator '=='
> has no left operand
> ../../../WWW/Library/Implementation/HTUtils.h:540:21: error: operator '=='
> has no left operand
> ../../../WWW/Library/Implementation/HTUtils.h:557:19: error: operator '>' has
> no left operand
> ../../../WWW/Library/Implementation/HTUtils.h:572:20: error: operator '=='
> has no left operand
> ../../../WWW/Library/Implementation/HTUtils.h:578:22: error: operator '=='
> has no left operand
> ../../../WWW/Library/Implementation/HTUtils.h:595:20: error: operator '>' has
> no left operand
>
> I eventually traced this to a bunch of SIZEOF_* macros (e.g.,
> SIZEOF_INT): 'configure' that comes with the distribution has
>
> #define SIZEOF_INT $ac_cv_sizeof_int
>
> first, but then it checks to make sure that $ac_cv_sizeof_int is
> defined, and is an integer. That is, it writes SIZEOF_INT to config.h
> first, and only then checks the value that it wrote. In my case,
> $ac_cv_sizeof_int was blank, and so I was winding up with SIZEOF_INT
> set to the empty string, and thus the "has no left operand" errors,
> above.
I think it's a problem with my use of the parameter substitutions in the
shell. Here is a suggested change which may fix the problem you reported:
--- aclocal.m4.orig 2015-05-09 10:45:55.000000000 -0400
+++ aclocal.m4 2015-05-09 10:46:05.000000000 -0400
@@ -1573,8 +1573,8 @@
dnl includes several header files.
AC_DEFUN([CF_CHECK_SIZEOF],[
AC_CHECK_SIZEOF([$1],[$2])
-if test "${ac_cv_type_$1:+set}" = set; then
- if test "${ac_cv_sizeof_$1:+set}" != set; then
+if test "${ac_cv_type_$1+set}" = set; then
+ if test "${ac_cv_sizeof_$1+set}" != set; then
AC_MSG_WARN(using $2 for sizeof $1)
ac_cv_sizeof_$1=$2
elif test "x${ac_cv_sizeof_$1}" = x0; then
--- configure.orig 2015-05-09 10:47:00.000000000 -0400
+++ configure 2015-05-09 10:46:35.000000000 -0400
@@ -27850,8 +27850,8 @@
#define SIZEOF_INT $ac_cv_sizeof_int
EOF
-if test "${ac_cv_type_int:+set}" = set; then
- if test "${ac_cv_sizeof_int:+set}" != set; then
+if test "${ac_cv_type_int+set}" = set; then
+ if test "${ac_cv_sizeof_int+set}" != set; then
{ echo "$as_me:27855: WARNING: using 4 for sizeof int" >&5
echo "$as_me: WARNING: using 4 for sizeof int" >&2;}
ac_cv_sizeof_int=4
@@ -28099,8 +28099,8 @@
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF
-if test "${ac_cv_type_long:+set}" = set; then
- if test "${ac_cv_sizeof_long:+set}" != set; then
+if test "${ac_cv_type_long+set}" = set; then
+ if test "${ac_cv_sizeof_long+set}" != set; then
{ echo "$as_me:28104: WARNING: using 4 for sizeof long" >&5
echo "$as_me: WARNING: using 4 for sizeof long" >&2;}
ac_cv_sizeof_long=4
@@ -28348,8 +28348,8 @@
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
EOF
-if test "${ac_cv_type_off_t:+set}" = set; then
- if test "${ac_cv_sizeof_off_t:+set}" != set; then
+if test "${ac_cv_type_off_t+set}" = set; then
+ if test "${ac_cv_sizeof_off_t+set}" != set; then
{ echo "$as_me:28353: WARNING: using 4 for sizeof off_t" >&5
echo "$as_me: WARNING: using 4 for sizeof off_t" >&2;}
ac_cv_sizeof_off_t=4
@@ -28597,8 +28597,8 @@
#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
EOF
-if test "${ac_cv_type_time_t:+set}" = set; then
- if test "${ac_cv_sizeof_time_t:+set}" != set; then
+if test "${ac_cv_type_time_t+set}" = set; then
+ if test "${ac_cv_sizeof_time_t+set}" != set; then
{ echo "$as_me:28602: WARNING: using 4 for sizeof time_t" >&5
echo "$as_me: WARNING: using 4 for sizeof time_t" >&2;}
ac_cv_sizeof_time_t=4
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature