<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - xcb-util-0.3.9 Solaris 10 pre U10 requires <stdio.h> for src/atoms.c"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64807">64807</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>xcb@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>xcb-util-0.3.9 Solaris 10 pre U10 requires <stdio.h> for src/atoms.c
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>xcb@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Solaris
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mark@ibiblio.org
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86 (IA32)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>Utils
</td>
</tr>
<tr>
<th>Product</th>
<td>XCB
</td>
</tr></table>
<p>
<div>
<pre>/etc/release: Solaris 10 10/09 s10x_u8wos_08a X86
uname -a : SunOS host 5.10 Generic_142901-13 i86pc i386 i86pc
# cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16
On Solaris 10 before Update 10 release there wasn't a vasprintf(). This invokes
a new code stream in the source.
The src/atoms.c program fails to compile as there's a missing <stdio.h> at the
top.
The recipe:
cd /var/tmp
rm -rf xcb-util-0.3.9
untgz /usr/local/src/x11/xcb-util-0.3.9.tar.gz
cd xcb-util-0.3.9
/bin/perl -pe "s%^LIBTOOL=.*%LIBTOOL='/usr/local/bin/libtool'%" -i
configure
./configure --prefix=/usr/local \
--disable-silent-rules
gmake
Making all in src
gmake[1]: Entering directory `/var/tmp/xcb-util-0.3.9/src'
source='atoms.c' object='atoms.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/usr/local/bin/libtool --tag=CC --mode=compile cc -D_STDC_C99=
-DPACKAGE_NAME=\"xcb-util\" -DPACKAGE_TARNAME=\"xcb-util\"
-DPACKAGE_VERSION=\"0.3.9\" -DPACKAGE_STRING=\"xcb-util\ 0.3.9\"
-DPACKAGE_BUGREPORT=\"<a href="mailto:xcb@lists.freedesktop.org">xcb@lists.freedesktop.org</a>\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"xcb-util\" -DVERSION=\"0.3.9\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DPACKAGE_VERSION_MAJOR=0 -DPACKAGE_VERSION_MINOR=3
-DPACKAGE_VERSION_PATCHLEVEL=9 -I. -I/usr/local/include -v
-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
-errwarn=E_FUNC_HAS_NO_RETURN_STMT -errwarn=E_BAD_PTR_INT_COMBINATION -g -c -o
atoms.lo atoms.c
libtool: compile: cc -D_STDC_C99= -DPACKAGE_NAME=\"xcb-util\"
-DPACKAGE_TARNAME=\"xcb-util\" -DPACKAGE_VERSION=\"0.3.9\"
"-DPACKAGE_STRING=\"xcb-util 0.3.9\""
-DPACKAGE_BUGREPORT=\"<a href="mailto:xcb@lists.freedesktop.org">xcb@lists.freedesktop.org</a>\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"xcb-util\" -DVERSION=\"0.3.9\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DPACKAGE_VERSION_MAJOR=0 -DPACKAGE_VERSION_MINOR=3
-DPACKAGE_VERSION_PATCHLEVEL=9 -I. -I/usr/local/include -v
-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
-errwarn=E_FUNC_HAS_NO_RETURN_STMT -errwarn=E_BAD_PTR_INT_COMBINATION -g -c
atoms.c -KPIC -DPIC -o .libs/atoms.o
"atoms.c", line 30: implicit function declaration: vsnprintf
cc: acomp failed for atoms.c
gmake[1]: *** [atoms.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/xcb-util-0.3.9/src'
gmake: *** [all-recursive] Error 1
# man vsnprintf
SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
int vsnprintf(char *s, size_t n, const char *format, va_list ap);
src/atoms.c includes <stdio.h> if _GNU_SOURCE is defined. This might not be
true for a non gcc compiler.
Simply adding a #include <stdio.h> at the top lets the compile finish. I can't
see why it shouldn't be there by default?
I use this line to insert the include:
/bin/perl -pe '($. == 1) && s%^%#include <stdio.h>\n%' -i src/atoms.c
New recipe:
cd /var/tmp
rm -rf xcb-util-0.3.9
untgz /usr/local/src/x11/xcb-util-0.3.9.tar.gz
cd xcb-util-0.3.9
/bin/perl -pe "s%^LIBTOOL=.*%LIBTOOL='/usr/local/bin/libtool'%" -i
configure
./configure --prefix=/usr/local \
--disable-silent-rules
/bin/perl -pe '($. == 1) && s%^%#include <stdio.h>\n%' -i src/atoms.c
gmake
gmake install</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>