DragonFly BSD

C Development Under DragonFly BSD-Volume 2 Programming for the DragonFly BSD Userland

C Development Under DragonFly BSD Volume 2: Programming for the DragonFly BSD Userland

DragonFly BSD Specific Clarifications

ERRNO Related

errno is now a thread-local variable, so "extern int errno" is now explicitly wrong (compile-time failure) on DFly where before it was just implicitly wrong (the specifications assert that errno.h is the only way to access errno). While it may work on other platforms, you should avoid that construct in general.

STDIO Related

Lots of other platforms allow programs to directly manipulate FILE structures. As part of the new STDIO API committed by Joerg, FILE is now an opaque type, so operations like sizeof(FILE) will not only fail to compile but are, in some sense, meaningless. Additionally, attempting to use copies of FILE structures is a likely path to SIGSEGV as stdio may keep internal state. You should always use the STDIO API and only the STDIO API to manipulate FILE structures.