Nmap Development mailing list archives
Re: [NSE patch] patch for pack/unpack to use platform independant types
From: Sven Klemm <sven () c3d2 de>
Date: Sun, 17 Aug 2008 10:38:26 +0200
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fyodor wrote: | On Sat, Aug 16, 2008 at 06:02:35AM +0200, Philip Pickering wrote: |> + |> +#ifndef HAVE_INT32_T |> +#define HAVE_INT32_T |> +typedef signed long int32_t; |> +#endif |> + |> + |> +#ifndef HAVE_INT64_T |> +#define HAVE_INT64_T |> +typedef signed long long int64_t; |> +// typedef __int64 int64_t; // use instead? |> +#endif | | Have you researched whether "signed long" is 32 bits on all Windows | platforms (including 64-bit platforms) and that "signed long long" is | always 64 bits? Have you researched whether Windows provides type | definitions with a more explicit bitwidth guarantee? | According to MSDN those types do not differ on 32-bit vs 64-bit. But Microsoft C++ also has __int8, __int16, __int32 and __int64. Using those types is probably better. See http://msdn.microsoft.com/en-us/library/cc953fe1.aspx http://msdn.microsoft.com/en-us/library/s3f49ktz.aspx Cheers, Sven - -- Sven Klemm http://cthulhu.c3d2.de/~sven/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkin44AACgkQevlgTHEIT4YwvwCaAxb4QpSlVlrzRa1mM+Tu4lGa pI4AoIFlu19fA8gHaWLgQ6PEuAZ3FALC =eS90 -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [NSE patch] patch for pack/unpack to use platform independant types Sven Klemm (Aug 07)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Sven Klemm (Aug 14)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 14)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 15)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Sven Klemm (Aug 16)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Fyodor (Aug 16)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Sven Klemm (Aug 17)
- Re: [NSE patch] patch for pack/unpack to use platform independant types doug (Aug 17)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 17)
- Message not available
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 17)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 21)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Philip Pickering (Aug 14)
- Re: [NSE patch] patch for pack/unpack to use platform independant types Sven Klemm (Aug 14)
- Re: [NSE patch] patch for pack/unpack to use platform independant types David Fifield (Aug 29)
- Re: [NSE patch] patch for pack/unpack to use platform independant types jah (Sep 03)
- Re: [NSE patch] patch for pack/unpack to use platform independant types David Fifield (Sep 03)
- Re: [NSE patch] patch for pack/unpack to use platform independant types jah (Sep 03)
- Re: [NSE patch] patch for pack/unpack to use platform independant types David Fifield (Sep 03)