diff -Naur original/bladeenc/cygwin.h cygwin/bladeenc/cygwin.h --- original/bladeenc/cygwin.h 1970-01-01 00:00:00.000000000 +0000 +++ cygwin/bladeenc/cygwin.h 2003-11-14 10:59:06.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef __CYGWIN_H +#define __CYGWIN_H + +#define BE_CYGPAT 1 /* bladeenc -> cygwin - PATCH version, increases with new ones */ + +#endif /* __CYGWIN_H */ diff -Naur original/bladeenc/bladesys.c cygwin/bladeenc/bladesys.c --- original/bladeenc/bladesys.c 2001-05-08 12:11:54.000000000 +0000 +++ cygwin/bladeenc/bladesys.c 2003-09-23 15:53:52.000000000 +0000 @@ -189,7 +189,9 @@ #endif + #ifdef UNIX_SYSTEM +#ifdef PRIO pid_t my_pid; int prio; @@ -209,6 +211,8 @@ my_pid = getpid(); setpriority (PRIO_PROCESS, my_pid, prio); #endif +#endif + #if SYSTEM == AMIGA_WOS /* WarpOS. */ diff -Naur original/bladeenc/loop.c cygwin/bladeenc/loop.c --- original/bladeenc/loop.c 2001-05-08 12:11:54.000000000 +0000 +++ cygwin/bladeenc/loop.c 2003-09-22 19:22:40.000000000 +0000 @@ -95,7 +95,7 @@ -#define infinity 99999999 +#define local_inf 999999 @@ -709,8 +709,8 @@ double xmax, the_xmax; - the_lo_quant = -infinity; /* "-infinity" */ - the_hi_quant = -infinity; /* the real maximum for high_quant is about +4 ! */ + the_lo_quant = -local_inf; /* "-infinity" */ + the_hi_quant = -local_inf; /* the real maximum for high_quant is about +4 ! */ the_xmax = -1.0; @@ -719,8 +719,8 @@ xmax = xmax_l[sfb]; if (xmax == 0.0) { - lo_quant_l[sfb] = -infinity; - hi_quant_l[sfb] = -infinity; + lo_quant_l[sfb] = -local_inf; + hi_quant_l[sfb] = -local_inf; } else { @@ -743,8 +743,8 @@ xmax = xmax_s[sfb][b]; if (xmax == 0.0) { - lo_quant_s[sfb][b] = -infinity; - hi_quant_s[sfb][b] = -infinity; + lo_quant_s[sfb][b] = -local_inf; + hi_quant_s[sfb][b] = -local_inf; } else { @@ -885,7 +885,7 @@ partial_quantize (); #if ORG_BINARY_SEARCH || ORG_QUANTANF_INIT || CHECK_TJ_OVERFLOW if (tjBitOverflow2) - bits = infinity; + bits = local_inf; else bits = count_bits (); #else @@ -899,7 +899,7 @@ tjBitOverflow2 = FALSE; quantize (); if (tjBitOverflow2) - bits = infinity; + bits = local_inf; else bits = count_bits (); #else @@ -950,7 +950,7 @@ counts the bits needed to code the scale factors (cod_info->part2_length) and the compression index (cod_info->scalefac_compress). - If there is no suitable index, it returns "infinity". + If there is no suitable index, it returns "local_inf". */ static int needed_bits_for_storing_scalefactors @@ -1044,7 +1044,7 @@ } - cod_info->part2_length = infinity; + cod_info->part2_length = local_inf; for (k = 0; k < 16; k++) { @@ -1732,7 +1732,7 @@ tjBitOverflow2 = FALSE; quantize (); if (tjBitOverflow2) - bits = infinity; + bits = local_inf; else bits = count_bits (); @@ -1754,7 +1754,7 @@ tjBitOverflow2 = FALSE; quantize (); if (tjBitOverflow2) - bits = infinity; + bits = local_inf; else bits = count_bits (); #else diff -Naur original/bladeenc/system.h cygwin/bladeenc/system.h --- original/bladeenc/system.h 2001-05-08 12:11:54.000000000 +0000 +++ cygwin/bladeenc/system.h 2003-09-23 15:47:54.000000000 +0000 @@ -28,6 +28,10 @@ - Added Andrea Vallinotto's Amiga WarpOS changes. - Added some more defines and cleaned up. + 2003-09-23 Hannu E K Nevalainen + + - Added simple "autodetection" for Cygwin (www.cygwin.com) + */ #ifndef __SYSTEM__ @@ -82,6 +86,10 @@ # define SYSTEM MSDOS_DJGPP # endif +# ifdef __CYGWIN__ /* www.cygwin.com, unix emulation layer for WinXX */ +# define SYSTEM UNIX_AUTOCONF +# endif + # if defined(__dest_os) && (__dest_os == __mac_os) /* defined in "ansi_prefix.mac.h" */ # define SYSTEM MAC_OS # endif @@ -267,6 +275,9 @@ # define DIRECTORY_SEPARATOR '/' #endif +#ifdef __CYGWIN__ /* www.cygwin.com, unix emulation layer for WinXX */ +# undef PRIO /* not correclty emulated? */ +#endif /*==== COMPILER SPECIFIC DEFINES ============================================ */ /* diff -Naur original/configure cygwin/configure --- original/configure 2001-05-08 12:11:56.000000000 +0000 +++ cygwin/configure 2003-09-22 19:41:58.000000000 +0000 @@ -1064,7 +1064,7 @@ int main() { #if BYTE_ORDER != BIG_ENDIAN - not big endian + return 1; // not big endian #endif ; return 0; } EOF