Commit 5974f956 by kollo

adapted to use with new version of mingw cross compiler for WINDOWS version

+ another little correction (new mingw-64)
parent 0188dd31
......@@ -50,8 +50,7 @@ CCSHARED=@CC@ $(REGS) -fPIC -shared -Wl,-Bsymbolic-functions
# Cross-Compiler fuer Windows-Excecutable
# WINCC=i386-mingw32msvc-gcc
WINCC=i586-mingw32msvc-gcc
WINCC=i686-w64-mingw32-gcc
# Cross-Compiler fuer ATARI ST TOS
TOSCC=m68k-atari-mint-gcc
......@@ -461,7 +460,7 @@ libx11basic.dll : x11basic.lib
x11basic.lib : $(LIBCSRC) WINDOWS/fnmatch.c $(HSRC) WINDOWS/fnmatch.h
rm -f *.o
$(WINCC) -DWINDOWS -c $(LIBCSRC) WINDOWS/fnmatch.c $(WININC)
i586-mingw32msvc-ar -ru $@ $(LIBOBJS) fnmatch.o
i686-w64-mingw32-ar -ru $@ $(LIBOBJS) fnmatch.o
rm -f *.o
# Make the exe for MS WINDOWS
......
......@@ -46,10 +46,12 @@ typedef struct { /**** BMP file info structure ****/
* Constants for the biCompression field...
*/
#ifndef BI_RGB
# define BI_RGB 0 /* No compression - straight BGR data */
# define BI_RLE8 1 /* 8-bit run-length compression */
# define BI_RLE4 2 /* 4-bit run-length compression */
# define BI_BITFIELDS 3 /* RGB bitmap with RGB masks */
#endif
#ifndef WINDOWS
typedef struct { /**** Colormap entry structure ****/
......
......@@ -7,7 +7,6 @@
*/
#ifdef WINDOWS
#undef HAVE_LOGB
#undef HAVE_FORK
#endif
......
......@@ -11,9 +11,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if defined(__CYGWIN__) || defined(__MINGW32__)
#include <windows.h>
#endif
#include <ctype.h>
#include <string.h>
......@@ -51,27 +48,16 @@
#include <bluetooth/rfcomm.h>
#include <bluetooth/l2cap.h>
#endif
#include "x11basic.h"
#include "xbasic.h"
#include "type.h"
#include "parser.h"
#include "svariablen.h"
#include "number.h"
#include "io.h"
#ifdef __hpux
#define CCTS_OFLOW 0x00010000 /* CTS flow control of output */
#define CRTS_IFLOW 0x00020000 /* RTS flow control of input */
#define CRTSCTS (CRTS_IFLOW|CCTS_OFLOW) /* RTS/CTS flow control */
#include <sys/termios.h>
#endif
#if defined _WIN32
#elif defined _WIN32
#include <ws2tcpip.h>
#include <winsock2.h>
#include <windows.h>
#include <conio.h>
#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
#define WIFEXITED(w) (((w) & 0xff) == 0)
#define NAME_MAX FILENAME_MAX
......@@ -90,9 +76,17 @@
#include <sys/ioctl.h>
#include <termios.h>
#include <fcntl.h>
#endif
#include "x11basic.h"
#include "xbasic.h"
#include "type.h"
#include "parser.h"
#include "svariablen.h"
#include "number.h"
#include "io.h"
#ifndef WINDOWS
#ifndef ATARI
#include <sys/mman.h>
......@@ -144,6 +138,7 @@ static int make_UDP_socket(unsigned short int port);
#ifndef ANDROID
#ifndef ATARI
#ifndef __APPLE__
#ifndef WINDOWS
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
......@@ -152,6 +147,7 @@ static int make_UDP_socket(unsigned short int port);
#endif
#endif
#endif
#endif
#if defined ANDROID
extern int lin,col;
......@@ -1502,7 +1498,7 @@ static void do_close(int i) {
break;
case FT_DLL: /* UNLINK */
#ifdef WINDOWS
if(FreeLibrary(filenr[i].dptr)==0) io_error(GetLastError(),"UNLINK");
if(FreeLibrary((HINSTANCE)filenr[i].dptr)==0) io_error(GetLastError(),"UNLINK");
else filenr[i].typ=FT_NONE;
#elif defined HAVE_DLOPEN
if(dlclose(filenr[i].dptr)==EOF) io_error(errno,"UNLINK");
......@@ -1837,19 +1833,19 @@ void reset_input_mode() {
/* Dynamisches Linken von Shared-Object-Files */
int f_symadr(PARAMETER *plist,int e) {
long adr=0;
int adr=0;
if(filenr[plist->integer].typ==FT_DLL) {
char *sym=malloc(plist[1].integer+1);
char *derror;
memcpy(sym,plist[1].pointer,plist[1].integer);
sym[plist[1].integer]=0;
#ifdef WINDOWS
adr = (long)GetProcAddress(filenr[plist[0].integer].dptr,sym);
adr = (unsigned int)GetProcAddress((HINSTANCE)filenr[plist[0].integer].dptr,sym);
if (adr==0) printf("ERROR: SYM_ADR: %s\n",GetLastError());
#else
#ifdef HAVE_DLOPEN
adr = (long)dlsym(filenr[plist[0].integer].dptr,sym);
if ((derror = (char *)dlerror()) != NULL) printf("ERROR: SYM_ADR: %s\n",derror);
adr = POINTER2INT(dlsym(filenr[plist[0].integer].dptr,sym));
if ((derror=(char *)dlerror()) != NULL) printf("ERROR: SYM_ADR: %s\n",derror);
#else
adr=-1;
xberror(9,"SYM_ADR"); /*Function or command %s not implemented*/
......
......@@ -8,8 +8,8 @@
#ifdef _WIN32
//#define FD_SETSIZE 4096
#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
//#define EINPROGRESS WSAEINPROGRESS
//#define EWOULDBLOCK WSAEWOULDBLOCK
#define gettimeofday(a,b) QueryPerformanceCounter(a)
#else
#define send(s,b,l,f) write(s,b,l)
......
......@@ -15,15 +15,15 @@
#include <unistd.h>
#include <signal.h>
#if defined WINDOWS
#define EX_OK 0
#include <windows.h>
#include <io.h>
#elif defined ANDROID
#else
#ifndef ANDROID
#include <sysexits.h>
#else
#define EX_OK 0
#include <sysexits.h>
#endif
#ifndef EX_OK
#define EX_OK 0
#endif
#include <ctype.h>
#include <time.h>
......
......@@ -35,6 +35,9 @@
#undef HAVE_INOTIFY_INIT
#undef HAVE_USB
#undef HAVE_PRIMORIAL_UI
#undef HAVE_FFTW
#undef HAVE_RFFTW
#undef HAVE_BLUETOOTH
#define USE_SDL
#define HAVE_SDL 1
#define HAVE_SDL_GFX 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment