Fix:projs/CodeBlocks:win32 add bytwswap and endian header files
authorafaber <afaber@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 3 Mar 2008 19:23:02 +0000 (19:23 +0000)
committerafaber <afaber@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 3 Mar 2008 19:23:02 +0000 (19:23 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@935 ffa7fe5e-494d-0410-b361-a75ebd5db220

projs/CodeBlocks/Navit_gtk.cbp
projs/CodeBlocks/Win32Extra/byteswap.h [new file with mode: 0644]
projs/CodeBlocks/Win32Extra/endian.h [new file with mode: 0644]

index 0a9bbb9..f491510 100644 (file)
@@ -80,6 +80,7 @@
                                        <Add library="gdk-win32-2.0" />
                                        <Add library="gdk_pixbuf-2.0" />
                                        <Add library="freetype" />
+                                       <Add library="fontconfig" />
                                        <Add library="z" />
                                        <Add library="gobject-2.0" />
                                        <Add library="gmodule-2.0" />
diff --git a/projs/CodeBlocks/Win32Extra/byteswap.h b/projs/CodeBlocks/Win32Extra/byteswap.h
new file mode 100644 (file)
index 0000000..a227dde
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _BYTESWAP_H
+#define _BYTESWAP_H
+
+static inline unsigned short bswap_16(unsigned short x) {
+  return (x>>8) | (x<<8);
+}
+
+static inline unsigned int bswap_32(unsigned int x) {
+  return (bswap_16(x&0xffff)<<16) | (bswap_16(x>>16));
+}
+
+static inline unsigned long long bswap_64(unsigned long long x) {
+  return (((unsigned long long)bswap_32(x&0xffffffffull))<<32) | (bswap_32(x>>32));
+}
+
+#endif
+
diff --git a/projs/CodeBlocks/Win32Extra/endian.h b/projs/CodeBlocks/Win32Extra/endian.h
new file mode 100644 (file)
index 0000000..cabb696
--- /dev/null
@@ -0,0 +1,5 @@
+#ifndef ENDIAN_H_INCLUDED
+#define ENDIAN_H_INCLUDED
+
+#endif
+