Diff: PortabilityNotes

Differences between current version and predecessor to the previous major change of PortabilityNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 4 Last edited on Monday, April 23, 2007 2:43:10 pm by AristotlePagaltzis
Older page: version 2 Last edited on Friday, July 7, 2006 9:44:30 am by AristotlePagaltzis Revert
@@ -104,8 +104,12 @@
  $ VAR2=bar; export VAR2 
  $ echo $VAR2 
+!! See also  
+* [What to watch out for when writing portable shell scripts |], a useful article on NewsForge  
 !!! [Shell] tools 
@@ -154,12 +158,15 @@
  uint64_t x; 
+! Avoid using other peoples types in your headers  
+Other peoples types change in size, sometimes at the flick of a #define. One example is off_t changes if LARGEFILE64 is defined under Linux. Use the c99 <tt><stdint.h></tt> types (uint64_t) so that they don't vary. If you absolutely must reference someone elses type, do so via a pointer (eg FILE*) and treat it as opaque.  
 !! See also 
 * [HP] has [a set of C portability notes |], although it targets HP-UX. 
 * [Intel] has [a similar set of notes |] (for porting to [ia64] and [amd64]) 
 Part of CategoryProgramming