fix warnings on 64 bits arch
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 22 Jan 2010 06:37:19 +0000 (06:37 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 22 Jan 2010 06:37:19 +0000 (06:37 +0000)
patch by Albin Tonerre, modified by me so that vc++ is happy

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/embryo@45428 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/embryo_cc_sc.h
src/bin/embryo_cc_sc1.c
src/bin/embryo_cc_sc2.c
src/bin/embryo_cc_sc3.c

index ea4c9a6..e72e1bc 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 
+#ifndef _MSC_VER
+# include <stdint.h>
+#else
+# include <stddef.h>
+#endif
+
 #include "embryo_cc_amx.h"
 
 /* Note: the "cell" and "ucell" types are defined in AMX.H */
@@ -53,7 +59,7 @@
 #define PREPROC_TERM  '\x7f'   /* termination character for preprocessor expressions (the "DEL" code) */
 #define sDEF_PREFIX   "default.inc"    /* default prefix filename */
 
-typedef void       *stkitem;   /* type of items stored on the stack */
+typedef intptr_t stkitem;      /* type of items stored on the stack */
 
 typedef struct __s_arginfo
 {                              /* function argument info */
index 96760fb..a2d3a5d 100644 (file)
@@ -3443,7 +3443,6 @@ test(int label, int parens, int invert)
 #endif
      }                         /* if */
 
-   /* FIXME: 64bit unsafe! putting an int on a stack of void *'s */
    pushstk((stkitem) intest);
    intest = 1;
    if (parens)
index de04fe0..d58108e 100644 (file)
@@ -116,14 +116,10 @@ plungequalifiedfile(char *name)
    pushstk((stkitem) inpf);
    pushstk((stkitem) inpfname);        /* pointer to current file name */
    pushstk((stkitem) curlibrary);
-   /* FIXME: 64bit unsafe */
    pushstk((stkitem) iflevel);
    assert(skiplevel == 0);
-   /* FIXME: 64bit unsafe */
    pushstk((stkitem) icomment);
-   /* FIXME: 64bit unsafe */
    pushstk((stkitem) fcurrent);
-   /* FIXME: 64bit unsafe */
    pushstk((stkitem) fline);
    inpfname = strdup(name);    /* set name of include file */
    if (inpfname == NULL)
index 9502784..59b774f 100644 (file)
@@ -1698,9 +1698,7 @@ primary(value * lval)
 
    if (matchtoken('('))
      {                         /* sub-expression - (expression,...) */
-       /* FIXME: 64bit unsafe */
        pushstk((stkitem) intest);
-       /* FIXME: 64bit unsafe */
        pushstk((stkitem) sc_allowtags);
 
        intest = 0;             /* no longer in "test" expression */