Re: macro feature tests in rsync code

2005-02-13 Thread John E. Malmberg
Wayne Davison wrote:
On Sat, Feb 12, 2005 at 09:53:28PM -0500, John E. Malmberg wrote:
 
I don't see this.  All the code in CVS uses #if to test the value of
HAVE_SOCKETPAIR.
I found the problem, one of the bugs in my first experimental pthreads 
version is that it sometimes creates a file with the wrong contents.  In 
this case it was trimslash.c containing some older code.

I hope to have a better version running soon, as I was about 80% done 
with isolating the thread specific variables before rsyncing up with the 
current tree.

I assume you're talking about gcc's -Wundef option.  We could add
-Wno-undef to the gcc CFLAGS setting in configure.in, like this:
Possibly, but I do not use GCC.  I have a similar option to disable 
these message and I have done so.  It it just that IMHO, it would be 
better to have the code test to see if macros are defined and always 
issue diagnostics about undefined macros.

-John
[EMAIL PROTECTED]
Personal Opinion Only
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


macro feature tests in rsync code

2005-02-12 Thread John E. Malmberg
The tests in rsync for features have been changed to testing the value 
of a macro definition instead of previously testing if the macro was 
defined.

This testing is now inconsistent with the HAVE_SOCKETPAIR macro, where 
in some places it is tested to see if the macro is defined, and other 
places to if it has a non zero value.

I would rather not globally disable the diagnostic about undefined 
macros, as it has shown in the past to help find programming problems.

-John
[EMAIL PROTECTED]
Personal Opinion Only

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: macro feature tests in rsync code

2005-02-12 Thread Wayne Davison
On Sat, Feb 12, 2005 at 09:53:28PM -0500, John E. Malmberg wrote:
 The tests in rsync for features have been changed to testing the value 
 of a macro definition instead of previously testing if the macro was 
 defined.

Acutally, the various tests were sometimes inconsistent -- some were
testing if a config item was defined, and some testing if it was
non-zero.  I made them all consistent in their checking for a non-zero
value.

 This testing is now inconsistent with the HAVE_SOCKETPAIR macro, where 
 in some places it is tested to see if the macro is defined, and other 
 places to if it has a non zero value.

I don't see this.  All the code in CVS uses #if to test the value of
HAVE_SOCKETPAIR.

 I would rather not globally disable the diagnostic about undefined 
 macros, as it has shown in the past to help find programming problems.

I assume you're talking about gcc's -Wundef option.  We could add
-Wno-undef to the gcc CFLAGS setting in configure.in, like this:

# If GCC, turn on warnings.
if test x$GCC = xyes
then
CFLAGS=$CFLAGS -Wall -W -Wno-undef
fi

That would add the flag to the Makefile and should silence any warnings
about this.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html