Bug 3159 - VA_COPY() brokenness
Summary: VA_COPY() brokenness
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.6
Hardware: Other Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 10:26 UTC by Daniel Richard G.
Modified: 2006-03-12 02:56 UTC (History)
0 users

See Also:


Attachments
Use va_copy() macro if defined (286 bytes, patch)
2005-10-11 11:57 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Richard G. 2005-10-11 10:26:42 UTC
Building rsync on a Solaris 10 / AMD64 system: 
 
----(begin snip)---- 
cc -I. -I. -Xa -v -xtarget=opteron -xarch=amd64 -xbuiltin -xstrconst -xO4 
-xcrossfile -DHAVE_CONFIG_H  -c lib/compat.c -o lib/compat.o 
cc -I. -I. -Xa -v -xtarget=opteron -xarch=amd64 -xbuiltin -xstrconst -xO4 
-xcrossfile -DHAVE_CONFIG_H  -c lib/snprintf.c -o lib/snprintf.o 
"lib/snprintf.c", line 853: left operand must be modifiable lvalue: op "=" 
"lib/snprintf.c", line 861: left operand must be modifiable lvalue: op "=" 
cc: acomp failed for lib/snprintf.c 
*** Error code 2 
make: Fatal error: Command failed for target `lib/snprintf.o' 
----(end snip)---- 
 
The system is using the fallback definition of VA_COPY(), i.e. "(dest) = 
(src)", instead of the va_copy() function. Neither HAVE_VA_COPY nor 
HAVE___VA_COPY is defined. Why not? Because they are defined as macros in the 
system headers, and rsync's configure script looks for them via AC_CHECK_FUNCS.
Comment 1 Wayne Davison 2005-10-11 11:57:00 UTC
Created attachment 1500 [details]
Use va_copy() macro if defined

I assume that this one-line change will fix the problem.  Would you test it and
let me know?
Comment 2 Daniel Richard G. 2005-10-11 12:47:49 UTC
Rsync builds successfully with this modification. 
Comment 3 Wayne Davison 2005-10-17 10:44:19 UTC
The suggested fix was committed to CVS.