Fixes compiler errors for latest Cygwin versions

This commit is contained in:
Markus Gans 2018-01-22 19:47:20 +01:00
parent d84132816f
commit 97f8d998a7
9 changed files with 2134 additions and 1289 deletions

View File

@ -1,3 +1,6 @@
2017-01-22 Markus Gans <guru.mail@muenster.de>
* Fixes compiler errors for latest Cygwin versions
2017-01-21 Markus Gans <guru.mail@muenster.de>
* The Final Cut can now also be compiled under Cygwin
* Fixed bug in FScrollView::scrollTo

View File

@ -130,5 +130,37 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

3294
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ AC_INIT([finalcut], [0.4.0])
AC_CONFIG_HEADER([config.h])
AX_PREFIX_CONFIG_H([include/final/fconfig.h], [F])
AC_CONFIG_SRCDIR([src/fobject.cpp])
AC_GNU_SOURCE
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_CXX

View File

@ -207,10 +207,42 @@
#define F_STDC_HEADERS 1
#endif
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#ifndef F_VERSION
#define F_VERSION "0.4.0"
#endif
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
/* once: INCLUDE_FINAL_FCONFIG_H */
#endif

View File

@ -491,9 +491,7 @@ class FMouseControl
// Methods
void enable();
void disable();
void xtermMouse (bool);
void enableXTermMouse();
void disableXTermMouse();
virtual void setRawData (FMouse::mouse_type, char[], int);
virtual void processEvent (struct timeval* time);
bool getGpmKeyPressed (bool);
@ -503,6 +501,9 @@ class FMouseControl
// Accessor
FMouse* getMouseWithData();
FMouse* getMouseWithEvent();
void xtermMouse (bool);
void enableXTermMouse();
void disableXTermMouse();
void putstring (const char[], int = 1);
// Data Member

View File

@ -48,6 +48,10 @@
#error "Only <final/final.h> can be included directly."
#endif
#if defined(__CYGWIN__)
#include "final/fconfig.h" // includes _GNU_SOURCE for wcwidth()
#endif
#include <sstream> // std::stringstream
#include "final/fterm.h"

View File

@ -1524,29 +1524,6 @@ void FMouseControl::disable()
disableXTermMouse();
}
//----------------------------------------------------------------------
void FMouseControl::xtermMouse (bool on)
{
// activate/deactivate the xterm mouse support
if ( ! use_xterm_mouse )
return;
if ( on )
putstring (CSI "?1001s" // save old highlight mouse tracking
CSI "?1000h" // enable x11 mouse tracking
CSI "?1002h" // enable cell motion mouse tracking
CSI "?1015h" // enable urxvt mouse mode
CSI "?1006h"); // enable SGR mouse mode
else
putstring (CSI "?1006l" // disable SGR mouse mode
CSI "?1015l" // disable urxvt mouse mode
CSI "?1002l" // disable cell motion mouse tracking
CSI "?1000l" // disable x11 mouse tracking
CSI "?1001r"); // restore old highlight mouse tracking
std::fflush(stdout);
}
//----------------------------------------------------------------------
void FMouseControl::setRawData ( FMouse::mouse_type mt
, char fifo_buf[]
@ -1641,6 +1618,29 @@ FMouse* FMouseControl::getMouseWithEvent()
return 0;
}
//----------------------------------------------------------------------
void FMouseControl::xtermMouse (bool on)
{
// activate/deactivate the xterm mouse support
if ( ! use_xterm_mouse )
return;
if ( on )
putstring (CSI "?1001s" // save old highlight mouse tracking
CSI "?1000h" // enable x11 mouse tracking
CSI "?1002h" // enable cell motion mouse tracking
CSI "?1015h" // enable urxvt mouse mode
CSI "?1006h"); // enable SGR mouse mode
else
putstring (CSI "?1006l" // disable SGR mouse mode
CSI "?1015l" // disable urxvt mouse mode
CSI "?1002l" // disable cell motion mouse tracking
CSI "?1000l" // disable x11 mouse tracking
CSI "?1001r"); // restore old highlight mouse tracking
std::fflush(stdout);
}
//----------------------------------------------------------------------
void FMouseControl::putstring (const char s[], int affcnt)
{