[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-standard types in public header files
From: |
Albert Chin |
Subject: |
Re: Non-standard types in public header files |
Date: |
Sat, 13 Aug 2005 19:30:21 -0500 |
User-agent: |
Mutt/1.5.6i |
On Fri, Aug 12, 2005 at 06:45:16PM +0200, Simon Josefsson wrote:
>
> Now that I think about this, one solution may be to avoid defining
> ssize_t altogether. Instead:
>
> @SSIZE_T@ gnutls_record_send( gnutls_session_t session, const void *data,
> size_t sizeofdata);
> @SSIZE_T@ gnutls_record_recv( gnutls_session_t session, void *data, size_t
> sizeofdata);
Look at how glib solves a similar problem. Of course, they define
their own types but they install a platform-specific .h file in
$prefix/lib/include (glibconfig.h). This is similar to the
gnutls-config.h suggested by Stepan Kasal.
AC_CONFIG_COMMANDS([gnutlsconfig.h],
[
outfile=gnutlsconfig.h
cat >$outfile <<_EOF_
#ifndef __GNUTLSCONFIG_H__
#define __GNUTLSCONFIG_H__
_EOF_
if test x$HAVE_SSIZE_T = xyes; then
echo '#define GTLS_SSIZE_T ssize_t' >>$outfile
else
echo '#define GTLS_SSIZE_T long' >>$outfile
fi
echo '#endif /* __GNUTLSCONFIG_H__ */' >>$outfile
])
--
albert chin (address@hidden)
- ssize_t, Simon Josefsson, 2005/08/12
- Re: ssize_t, Bruno Haible, 2005/08/12
- Re: ssize_t, Simon Josefsson, 2005/08/12
- Re: [bug-gnulib] Non-standard types in public header files (was: Re: ssize_t), Bruno Haible, 2005/08/12
- Re: Non-standard types in public header files, Simon Josefsson, 2005/08/12
- Re: Non-standard types in public header files,
Albert Chin <=
- Re: Non-standard types in public header files, Simon Josefsson, 2005/08/15
- Re: Non-standard types in public header files, Stepan Kasal, 2005/08/25
Re: ssize_t, Karl Berry, 2005/08/12