Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adapt header to last change in code
[simgrid.git] / README.coding
1 **
2 ** Random bits about coding standards and portability
3
4 MALLOC:
5  You must cast the result of malloc on AIX. 
6  It's even better to use gras_new when possible.
7
8 SIZE_T
9  If possible, avoid size_t and use unsigned long instead.
10
11  #include <sys/types.h> in all files manipulating size_t
12  do cast it to unsigned long before printing (and use %lu)
13  
14
15
16 PRINTF pointer difference
17  printf ("diff = %ld\n", (long) (pointer2 - pointer1));
18