| 1 | These are the rules so that older bsd systems and the POSIX standard |
| 2 | system can coexist togather. |
| 3 | |
| 4 | 1) If you use select then include "ntp_select.h" |
| 5 | select is not standard, since it is very system depenedent as to where |
| 6 | select is defined. The logic to include the right system dependent |
| 7 | include file is in "ntp_select.h". |
| 8 | 2) Always use POSIX defintion of strings. Inlcude "ntp_string.h" instaed |
| 9 | of <string.h>. |
| 10 | 3) Always include "ntp_malloc.h" if you use malloc. |
| 11 | 4) Always include "ntp_io.h" instead of <sys/file.h> or <fnctl.h> to |
| 12 | get O_* flags. |
| 13 | 5) Always include "ntp_if.h" instead of <net/if.h>. |
| 14 | 6) Always include "ntp_stdlib.h" instead of <stdlib.h>. |
| 15 | 7) Always define a system identifier for any new system added to the |
| 16 | machines directory. The identifier should always start with SYS_! |
| 17 | 8) Define any special defines needed for a system in |
| 18 | ./include/ntp_machine.h based on system identifier. This file is |
| 19 | included by the "ntp_types.h" file and should always be placed |
| 20 | first after the <> defines. |
| 21 | 9) Define any special library prototypes left over from the system |
| 22 | library and include files in the "l_stdlib.h" file. This file is |
| 23 | included by the "ntp_stdlib.h" file and should ordinarily be |
| 24 | placed last in the includes list. |
| 25 | 10) Don't define a include file by the same name as a system include file. |
| 26 | |
| 27 | |
| 28 | "l_stdlib.h" can contain any extra definitions that are needed so that |
| 29 | gcc will shut up. They should be controlled by a system identifier and |
| 30 | there should be a seperate section for each system. Really this will |
| 31 | make it easier to maintain. |
| 32 | |
| 33 | See include/ntp_machines.h for the verious compile time options. |
| 34 | |
| 35 | Good luck. |
| 36 | |
| 37 | Bill Jones, with amendments by Dave Mills |