__FreeBSD__ not available and unsigned long type

Arthur Chance freebsd at qeng-ho.org
Wed Oct 13 15:12:38 UTC 2010


On 10/13/10 13:47, Chetan Shukla wrote:
> Hi
>
> I have two doubts working further ion FreeBSD.
>
> In my machine (8.0-RELEASE) I am not getting the macro __FreeBSD__.
> As a workaround I have to conditionally define it in makefile.
> Could someone define what is missing in this case.

It's compiled into gcc. Specifically 
/usr/src/contrib/gcc/config/freebsd-spec.h, which contains the line

         builtin_define_with_int_value ("__FreeBSD__", FBSD_MAJOR);


> Moreover when I have to use unsigned long and signed long the only
> Options that I have are to write "unsigned long " and "signed long"
> Nothing more specific like uint64_t?Or are there any special header files that need to be included.

#include <stdint.h>

> Looking forward for guidance,


-- 
"Although the wombat is real and the dragon is not, few know what a
wombat looks like, but everyone knows what a dragon looks like."

	-- Avram Davidson, _Adventures in Unhistory_


More information about the freebsd-questions mailing list