Albert Chin <[EMAIL PROTECTED]> writes: > 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 > ])
Yes, something like that seem like a good solution. I wonder how much gnulib can help with this though. So far, nothing in gnulib is installed by 'make install', and the foo-config.h file has to have a unique name for each project. Also, these modules will have to be named something differently, e.g., external-ssize_t, to not confuse them with "normal" modules. Thanks. _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib