[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libssh and Visual C++ (again)


On Mon, 24 Sep 2012 10:11, asn@xxxxxxxxxxxxxx said:

> Ok, then we should probably use
>
> typedef uint64_t ssh_ssize_t;

IMHO, the best way to handle system dependent definition is to provide a
header file customized for the system.  Thus at build time you don't use
and install the header you distribute with the source but one which
matches the system's requirement.  For example on GNU systems you may
simply

 #include <unistd.h>

but on Windows you install a header with the line:

 typedef int ssize_t;

(or whatever the particular Windows system requires).  Because sometimes
users simply throw in any header file they found somewhere, I often add
a configure check to see whether the header matches the expected one
(e.g. using the CPU-OS-VENDOR string)

Adding your own type merely shifts the responsibility from you to the
user ;-)
  


Salam-Shalom,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


Follow-Ups:
Re: libssh and Visual C++ (again)Christophe Baribaud <christophe.baribaud@xxxxxxxxx>
References:
libssh and Visual C++ (again)Christophe Baribaud <christophe.baribaud@xxxxxxxxx>
Re: libssh and Visual C++ (again)Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: libssh and Visual C++ (again)Christophe Baribaud <christophe.baribaud@xxxxxxxxx>
Re: libssh and Visual C++ (again)Andreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org