2010-07-22 10:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/gtcrs/gtcrs.c
    ! Fixed to build on Cygwin.

  * external/minizip/minizip.dif
  * external/minizip/ioapi.h
    ! Patch by Tamas Tevesz: "it's rather questionable this has ever
      done what it was intended to do. bad name for one macro, half
      of other macro missing."
      Fixes to largefile support.
This commit is contained in:
Viktor Szakats
2010-07-22 08:16:08 +00:00
parent af0b539000
commit 9b9abe5f5e
4 changed files with 55 additions and 38 deletions

View File

@@ -16,6 +16,17 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-22 10:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtcrs/gtcrs.c
! Fixed to build on Cygwin.
* external/minizip/minizip.dif
* external/minizip/ioapi.h
! Patch by Tamas Tevesz: "it's rather questionable this has ever
done what it was intended to do. bad name for one macro, half
of other macro missing."
Fixes to largefile support.
2010-07-21 17:53 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/QTreeWidget.cpp
* contrib/hbqt/qth/QTreeWidget.qth

View File

@@ -30,11 +30,14 @@
* on 32bit platforms
* But might need better if/def to select just the platforms that needs them.
*/
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#ifndef _FILE_OFFSET_BIT
#define _FILE_OFFSET_BIT 64
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#endif

View File

@@ -1,6 +1,6 @@
diff -urN minizip.orig/crypt.h minizip/crypt.h
--- minizip.orig/crypt.h 2010-07-16 15:11:30.820235577 +0200
+++ minizip/crypt.h 2010-07-16 15:11:30.820235577 +0200
--- minizip.orig/crypt.h 2010-07-22 00:54:22.350236245 +0200
+++ minizip/crypt.h 2010-07-22 00:54:22.350236245 +0200
@@ -38,6 +38,8 @@
* unpredictable manner on 16-bit systems; not a problem
* with any known compiler so far, though */
@@ -11,8 +11,8 @@ diff -urN minizip.orig/crypt.h minizip/crypt.h
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
}
diff -urN minizip.orig/ioapi.c minizip/ioapi.c
--- minizip.orig/ioapi.c 2010-07-16 15:11:30.820235577 +0200
+++ minizip/ioapi.c 2010-07-16 15:11:30.820235577 +0200
--- minizip.orig/ioapi.c 2010-07-22 00:54:22.350236245 +0200
+++ minizip/ioapi.c 2010-07-22 00:54:22.360235636 +0200
@@ -15,6 +15,7 @@
#endif
@@ -143,9 +143,9 @@ diff -urN minizip.orig/ioapi.c minizip/ioapi.c
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
diff -urN minizip.orig/ioapi.h minizip/ioapi.h
--- minizip.orig/ioapi.h 2010-07-16 15:11:30.820235577 +0200
+++ minizip/ioapi.h 2010-07-16 15:11:30.820235577 +0200
@@ -21,29 +21,50 @@
--- minizip.orig/ioapi.h 2010-07-22 00:54:22.370235865 +0200
+++ minizip/ioapi.h 2010-07-22 00:54:22.370235865 +0200
@@ -21,29 +21,53 @@
#ifndef _ZLIBIOAPI64_H
#define _ZLIBIOAPI64_H
@@ -175,11 +175,14 @@ diff -urN minizip.orig/ioapi.h minizip/ioapi.h
+ * on 32bit platforms
+ * But might need better if/def to select just the platforms that needs them.
+ */
+ #ifndef _LARGEFILE_SOURCE
+ #define _LARGEFILE_SOURCE
+ #endif
+ #ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #ifndef _FILE_OFFSET_BIT
+ #define _FILE_OFFSET_BIT 64
+ #ifndef _FILE_OFFSET_BITS
+ #define _FILE_OFFSET_BITS 64
+ #endif
#endif
@@ -214,8 +217,8 @@ diff -urN minizip.orig/ioapi.h minizip/ioapi.h
#define fopen64 fopen
#define ftello64 ftell
diff -urN minizip.orig/unzip.c minizip/unzip.c
--- minizip.orig/unzip.c 2010-07-16 15:11:30.870234454 +0200
+++ minizip/unzip.c 2010-07-16 15:11:30.870234454 +0200
--- minizip.orig/unzip.c 2010-07-22 00:54:22.420234776 +0200
+++ minizip/unzip.c 2010-07-22 00:54:22.430235285 +0200
@@ -68,13 +68,17 @@
#include <stdlib.h>
#include <string.h>
@@ -303,8 +306,8 @@ diff -urN minizip.orig/unzip.c minizip/unzip.c
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
pfile_in_zip_read_info->crc32=0;
diff -urN minizip.orig/zip.c minizip/zip.c
--- minizip.orig/zip.c 2010-07-16 15:11:30.930234949 +0200
+++ minizip/zip.c 2010-07-16 15:11:30.930234949 +0200
--- minizip.orig/zip.c 2010-07-22 00:54:22.480235591 +0200
+++ minizip/zip.c 2010-07-22 00:54:22.480235591 +0200
@@ -29,16 +29,20 @@
#include "zlib.h"
#include "zip.h"

View File

@@ -153,7 +153,7 @@ typedef struct InOutBase {
/* curses data */
SCREEN *basescr;
WINDOW *stdscr;
WINDOW *hb_stdscr;
FILE *basein;
FILE *baseout;
chtype std_chmap[ 256 ];
@@ -1375,13 +1375,13 @@ static void gt_refresh( InOutBase * ioBase )
{
/*
if(ioBase->cursor == SC_NONE)
leaveok( ioBase->stdscr, HB_TRUE );
leaveok( ioBase->hb_stdscr, HB_TRUE );
else
leaveok( ioBase->stdscr, HB_FALSE );
leaveok( ioBase->hb_stdscr, HB_FALSE );
*/
/* if(ioBase->cursor != SC_NONE) */
wmove( ioBase->stdscr, ioBase->row, ioBase->col );
wrefresh( ioBase->stdscr );
wmove( ioBase->hb_stdscr, ioBase->row, ioBase->col );
wrefresh( ioBase->hb_stdscr );
disp_cursor( ioBase );
disp_mousecursor( ioBase );
}
@@ -1788,7 +1788,7 @@ static int gt_resize( InOutBase * ioBase )
{
/*
#if defined( NCURSES_VERSION )
wresize( ioBase->stdscr, rows, cols );
wresize( ioBase->hb_stdscr, rows, cols );
#endif
*/
endwin();
@@ -1802,7 +1802,7 @@ static int gt_resize( InOutBase * ioBase )
}
#endif
*/
getmaxyx( ioBase->stdscr, ioBase->maxrow, ioBase->maxcol );
getmaxyx( ioBase->hb_stdscr, ioBase->maxrow, ioBase->maxcol );
}
return ret;
}
@@ -2035,7 +2035,7 @@ static InOutBase *create_ioBase( char *term, int infd, int outfd, int errfd,
return NULL;
}
ioBase->stdscr = stdscr;
ioBase->hb_stdscr = stdscr;
ioBase->flash = tiGetS( "flash" );
ioBase->beep = tiGetS( "bel" );
@@ -2136,12 +2136,12 @@ static InOutBase *create_ioBase( char *term, int infd, int outfd, int errfd,
}
}
getmaxyx( ioBase->stdscr, ioBase->maxrow, ioBase->maxcol );
scrollok( ioBase->stdscr, HB_FALSE );
getmaxyx( ioBase->hb_stdscr, ioBase->maxrow, ioBase->maxcol );
scrollok( ioBase->hb_stdscr, HB_FALSE );
/*
idlok( ioBase->stdscr, HB_FALSE );
idcok( ioBase->stdscr, HB_FALSE );
leaveok( ioBase->stdscr, HB_FALSE );
idlok( ioBase->hb_stdscr, HB_FALSE );
idcok( ioBase->hb_stdscr, HB_FALSE );
leaveok( ioBase->hb_stdscr, HB_FALSE );
*/
/*
* curses keyboard initialization
@@ -2151,19 +2151,19 @@ static InOutBase *create_ioBase( char *term, int infd, int outfd, int errfd,
*/
raw();
leaveok( ioBase->stdscr, HB_FALSE );
leaveok( ioBase->hb_stdscr, HB_FALSE );
curs_set( 0 );
/*
nonl();
nodelay( ioBase->stdscr, HB_TRUE);
keypad( ioBase->stdscr, HB_FALSE);
nodelay( ioBase->hb_stdscr, HB_TRUE);
keypad( ioBase->hb_stdscr, HB_FALSE);
timeout( 0 );
noecho();
curs_set( 0 );
*/
wclear( ioBase->stdscr );
wrefresh( ioBase->stdscr );
wclear( ioBase->hb_stdscr );
wrefresh( ioBase->hb_stdscr );
gt_ttyset( ioBase );
add_efds( ioBase, ioBase->base_infd, O_RDONLY, NULL, NULL );
@@ -2186,7 +2186,7 @@ static void destroy_ioBase( InOutBase * ioBase )
}
/* curses SCREEN delete */
if( ioBase->stdscr != NULL )
if( ioBase->hb_stdscr != NULL )
{
ioBase->disp_count = 0;
/* on exit restore a cursor share and leave it visible
@@ -2649,9 +2649,9 @@ static HB_BOOL hb_gt_crs_Resume( PHB_GT pGT )
if( s_ioBase )
{
s_ioBase->lcursor = SC_UNDEF;
wrefresh( s_ioBase->stdscr );
wrefresh( s_ioBase->hb_stdscr );
gt_ttyset( s_ioBase );
/* redrawwin( s_ioBase->stdscr ); */
/* redrawwin( s_ioBase->hb_stdscr ); */
gt_refresh( s_ioBase );
}
return HB_TRUE;
@@ -2900,7 +2900,7 @@ static void hb_gt_crs_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize )
HB_USHORT usChar;
chtype ch;
wmove( s_ioBase->stdscr, iRow, iCol );
wmove( s_ioBase->hb_stdscr, iRow, iCol );
while( iSize-- > 0 )
{
if( !HB_GTSELF_GETSCRCHAR( pGT, iRow, iCol++, &iColor, &bAttr, &usChar ) )
@@ -2908,7 +2908,7 @@ static void hb_gt_crs_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize )
ch = ( s_ioBase->attr_map[ iColor ] & s_ioBase->attr_mask ) |
( bAttr & HB_GT_ATTR_BOX ? s_ioBase->box_chmap[ usChar & 0xff ] :
s_ioBase->std_chmap[ usChar & 0xff ] );
waddch( s_ioBase->stdscr, ch );
waddch( s_ioBase->hb_stdscr, ch );
}
}
}