cross compilier working
[xboard.git] / backend.h
index 9e1fbb0..bd52212 100644 (file)
--- a/backend.h
+++ b/backend.h
@@ -169,6 +169,47 @@ int ToUpper P((int c));
 
 extern GameInfo gameInfo;
 
+/* ICS vars used with backend.c and zippy.c */
+#define ICS_GENERIC 0
+#define ICS_ICC 1
+#define ICS_FICS 2
+#define ICS_CHESSNET 3 /* not really supported */
+int ics_type;
+
+/* unsigned int 64 for engine nodes work and display */
+#ifdef WIN32
+       /* I don't know the name for this type of other compiler
+        * If it not work, just modify here
+        * This is for MS Visual Studio
+        */
+       #ifdef _MSC_VER
+               #define u64 unsigned __int64
+               #define s64 signed __int64
+               #define u64Display "%I64u"
+               #define s64Display "%I64d"
+               #define u64Const(c) (c ## UI64)
+               #define s64Const(c) (c ## I64)
+       #else
+               /* place holder
+                * or dummy types for other compiler
+                */
+               #define u64 unsigned long long
+               #define s64 signed long long
+               #define u64Display "%I64u"
+               #define s64Display "%I64d"
+               #define u64Const(c) (c ## ull)
+               #define s64Const(c) (c ## ll)
+       #endif
+#else
+       /* GNU gcc */
+       #define u64 unsigned long long
+       #define s64 signed long long
+       #define u64Display "%llu"
+       #define s64Display "%lld"
+       #define u64Const(c) (c ## ull)
+       #define s64Const(c) (c ## ll)
+#endif
+
 
 /* pgntags.c prototypes
  */
@@ -188,7 +229,7 @@ typedef struct _ListGame {
     unsigned long offset;   /*  Byte offset of game within file.     */
     GameInfo gameInfo;      /*  Note that some entries may be NULL. */
 } ListGame;
+
 extern List gameList;
 void ClearGameInfo P((GameInfo *));
 int GameListBuild P((FILE *));