Fix-fix.
[ikiwiki.git] / docs / developer / C_Development_Under_DragonFly_BSD-Volume_2_Programming_for_the_DragonFly_BSD_Userland.mdwn
CommitLineData
7ea64767 1# C Development Under DragonFly BSD Volume 2: Programming for the DragonFly BSD Userland
2
3
4[[!toc levels=2]]
5
6
7
8
9## DragonFly BSD Specific Clarifications
10
11
12
13### ERRNO Related
14
15
16
17errno 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.
18
19
20
21### STDIO Related
22
23
24
25Lots 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.
26