champagne wrote:Could you give a list of instructions you had to change
These are the code changes i made.
Compiler g++-4.5
OS Linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Hidden Text: Show
- Code: Select all
> ..original
< ..my change
Windows (VC) specific things:
utilities.h
< #ifndef INC_UTILITIES_H
< #define INC_UTILITIES_H
< #include <string.h>
< #include <sys/time.h>
< int strcpy_s(char dest[], size_t n, const char *src);
< int strncpy_s(char dest[], size_t n, const char *src, size_t n1);
< #endif
utilities.cpp
> #include <string.h>
> #include <sys/timeb.h>
< int strcpy_s(char dest[], size_t n, const char *src)
< {
my implementation (not tested)
< }
< int strncpy_s(char dest[], size_t n, const char *src, size_t n1)
< {
my implementation (not tested)
< }
long GetTimeMillis() {
> struct _timeb tbuf;
> _ftime64_s(&tbuf);
> return ((long)(1000 * tbuf.time) + tbuf.millitm);
< struct timeval tbuf;
< gettimeofday(&tbuf, NULL);
< return ((long)(1000 * tbuf.tv_sec) + tbuf.tv_usec/1000.0);
{
fsss.h
> #include <STRING.H> //NULL
< #include <string.h> //NULL
t_128.h
> typedef union __declspec(intrin_type) _CRT_ALIGN(16) t_128 {
< typedef union t_128 {
What my compiler did not like:
ratingengine.cpp
("Op" is somewhere defined in stream lib)
> Op
< MyOp
puzzle.h
> int DIVF::N_Fixes(const char * pg, int el) const {
< int N_Fixes(const char * pg, int el) const {
t_128.cpp
both extern and static variables
> static const t_128 bitSet[128] =
< const t_128 bitSet[128] =
> static const t_128 maskLSB[129] =
< const t_128 maskLSB[129] =
> static const t_128 maskffff = {0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF};
> static const t_128 false128 = {0xaaaaaaaaaaaaaaaa,0xaaaaaaaaaaaaaaaa}; //...1010 pattern
> static const t_128 true128 = {0x5555555555555555,0x5555555555555555}; //...0101 pattern
---
< const t_128 maskffff = {0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF};
< const t_128 false128 = {0xaaaaaaaaaaaaaaaa,0xaaaaaaaaaaaaaaaa}; //...1010 pattern
< const t_128 true128 = {0x5555555555555555,0x5555555555555555}; //...0101 pattern
skfr.cpp
initialize
> int val1;
< int val1 = 0;