r25156: Update coding guiding wrt to primitive data types
authorGerald Carter <jerry@samba.org>
Fri, 14 Sep 2007 12:06:34 +0000 (12:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:46 +0000 (12:30 -0500)
(This used to be commit 01d42744903d7ef9044fa4d2ad1cc64594717573)

README.Coding

index 73ceb5028cfd28d5fc838531b741127042d9f4b9..da6bb382078bfa4c49f13579797b60382102fb79 100644 (file)
@@ -214,3 +214,18 @@ or
        if (!x) {
                fprintf(stderr, "Unable to alloc memory!\n");
        }
+
+
+Primitive Data Types
+--------------------
+
+Samba has large amounts of historical code which makes use of data types 
+commonly supported by the C99 standard. However, at the time such types 
+as boolean and exact width integers did not exist and Samba developers 
+were forced to provide their own.  Now that these types are guaranteed to 
+be available either as part of the compiler C99 support or from lib/replace/, 
+new code should adhere to the following conventions:
+
+  * Booleans are of type "bool" (not BOOL)
+  * Boolean values are "true" and "false" (not True or False)
+  * Exact width integers are of type [u]int[8|16|32|64]_t