Compiling samba 2.2.8 on HP-UX 11.00 - conflicting definition of snprintf

Ladner, Eric (Eric.Ladner) Eric.Ladner at chevrontexaco.com
Wed Mar 19 19:35:04 GMT 2003


I believe the only difference is a 'const' modifier on one of the
arguments in the declaration of the function.  I can't remember if I had
to comment out the implementation part of the fucntions or not.

I edited the source and added the const to the file that didn't have it
and all was right with the world.

E

-----Original Message-----
From: Adam Fox [mailto:adam.fox at gribbles.com.au] 
Sent: Tuesday, March 18, 2003 23:39
To: samba-technical at lists.samba.org
Subject: Compiling samba 2.2.8 on HP-UX 11.00 - conflicting definition
of snprintf


Hi all,

I'm trying to compile samba 2.2.8 on a HP-UX 11.00 system. I've run the
configure script without any arguments, but when I run 'make' I get the
following error:

Compiling lib/snprintf.c
lib/snprintf.c:777: conflicting types for `vsnprintf'
/var/bin/../lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0/include/stdio.h:494:
previous
declaration of `vsnprintf'
lib/snprintf.c:792: conflicting types for `snprintf'
/var/bin/../lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0/include/stdio.h:493:
previous
declaration of `snprintf'
*** Error exit code 1

I did some searching on the mailing list and found other people having
the same problem with other versions of samba, but I didn't find any
solutions. When I ran configure the following was reported about the
printf functions:

checking for asprintf declaration... no
checking for vasprintf declaration... no
checking for vsnprintf declaration... yes
checking for snprintf declaration... yes
[...]
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... no
checking for vasprintf... no

One suggestion I saw was to comment out line 492 and 493 of the stdio.h
from the HP-UX include directory, but I'm not too keen on mucking around
with the HP files. Is it possible to not redefine the snprintf functions
and just use the one that comes with HP-UX?

Any help is appreciated.


Adam Fox


Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from any system and destroy any
copies.

Any views expressed in this message are those of the individual sender
and may not necessarily reflect the views of The Gribbles Group.

Thank You.

Whilst every effort has been made to ensure that this e-mail message and
any attachments are free from viruses, you should scan this message and
any attachments. Under no circumstances do we accept liability for any
loss or damage which may result from your receipt of this message or any
attachment.




More information about the samba-technical mailing list