Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2001 09:46:59 -0500
From:      Lucas Bergman <iceberg@pobox.com>
To:        adyas@twowaytv.co.uk
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: stdint.h - where?
Message-ID:  <20010730094659.A96507@comp04.prc.uic.edu>
In-Reply-To: <20010730100532.D9481-100000@r2d2.twowaytv.co.uk>; from alex@twowaytv.co.uk on Mon, Jul 30, 2001 at 10:14:49AM %2B0100
References:  <20010730100532.D9481-100000@r2d2.twowaytv.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
> i'm trying to compile some stuff written for linux, and i'm getting
> errors to the effect that i'm missing stdint.h.  a find doesn't
> un-earth anyting.

Your find is correct.  It doesn't exist on FreeBSD.

> looks to me like standard integer maths library?

  http://www.dinkumware.com/htm_cl/stdint.html

Actually, it's mostly to allow the programmer to use types like
uint32_t, guaranteed to be a certain number of bits.  There are some
macros, as well, supposed to speed up certain integer operations on
winning systems.

It was added in C99, so it's not in a lot of systems, including
FreeBSD.  Portable (Unix) software shouldn't use stuff from stdint.h,
but that doesn't stop the "all your base are belong to GNU" crowd.
Since it is ISO-compatible, I can't get as mad as I usually do about
this stuff, though.

> is there a bsd equivalent?

Strictly speaking, no.  But, you can come up with a lot of equivalents
in FreeBSD headers, kind of scattered around.  For example,
sys/types.h defines u_int32_t, which is functionally the same as C99's
uint32_t.  You get the idea.

Lucas

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730094659.A96507>