strcpy needs strlen+1
[fw/sdcc] / src / port.h
index b41e0f826886fc2ededff49534291d71ef705000..44156d3528f38f354e493d57322aa85e06bb8d51 100644 (file)
@@ -151,7 +151,7 @@ typedef struct {
 
     /* parameter passing in register related functions */
     void (*reset_regparms)();          /* reset the register count */
-    int  (*reg_parm)(struct link *);   /* will return 1 if can be passed in register */
+    int  (*reg_parm)(struct sym_link *);   /* will return 1 if can be passed in register */
 
     /** Process the pragma string 'sz'.  Returns 0 if recognised and
        processed, 1 otherwise.  May be NULL.
@@ -169,6 +169,10 @@ typedef struct {
     bool ge_nlt ;     /* transform (a >= b) to !(a < b)   */
     bool ne_neq ;     /* transform a != b --> ! (a == b)  */
     bool eq_nne ;     /* transform a == b --> ! (a != b)  */
+
+#define PORT_MAGIC 0xAC32
+    /** Used at runtime to detect if this structure has been completly filled in. */
+    int magic;
 } PORT;
 
 extern PORT *port;
@@ -191,6 +195,12 @@ extern PORT ds390_port;
 #if !OPT_DISABLE_PIC
 extern PORT pic14_port;
 #endif
+#if !OPT_DISABLE_I186
+extern PORT i186_port;
+#endif
+#if !OPT_DISABLE_TLCS900H
+extern PORT tlcs900h_port;
+#endif
 
 /* Test to see if we are current compiling in DS390 mode. */
 #define IS_MCS51_PORT (port == &mcs51_port)