Commit 0eb5b28b authored by kollo's avatar kollo

Changes so that X11-Basic will compile on MAC-OSX

Added workaround and Error message for error: indirect goto ...
... in function with no address-of-label expressions goto *func;
This turns out to be a well known error in gcc on Macintosh/OS X
No fix so far.

fixed error in readline/history extern add_history()

fixed missing linux/fb.h

fixed error: unknown type name 'key_t'

fixed Undefined symbols "_input_bit"
parent e94a0f1b
......@@ -33,7 +33,7 @@ long bits_to_follow; /* Number of opposite bits to output after */
unsigned char *put_pointer;
int put_size;
inline int input_bit() {
int input_bit() {
int t;
if (bits_to_go==0) { /* Read the next byte if no */
if(put_size>0) {
......
......@@ -28,7 +28,7 @@ extern int cum_freq[]; /* Cumulative symbol frequencies */
void start_model();
void update_model(int symbol);
int decode_symbol( int cum_freq[] );
inline int input_bit();
int input_bit();
void encode_symbol(int symbol,int cum_freq[] );
void bit_plus_follow( int bit );
......
......@@ -19,6 +19,7 @@
#ifdef HAVE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
#ifdef ANDROID
#include "terminal.h"
......@@ -196,8 +197,6 @@ char *readline(char *prompt) {
return(line_read);
}
#else
extern void add_history(const char *line);
#endif
......
......@@ -32,8 +32,10 @@
#include <sys/time.h>
#include <sys/mman.h>
#ifndef ANDROID
#ifndef __APPLE__
#include <linux/fb.h>
#include <linux/ioctl.h>
#endif
#else
#include <android/bitmap.h>
#endif
......
......@@ -91,6 +91,10 @@
#include <netdb.h>
#endif
#ifdef __APPLE__
#define NAME_MAX FILENAME_MAX
#endif
double sensordata[ANZSENSORS];
/* fuer Dynamisches Linken von shared Object-Files */
......@@ -129,6 +133,7 @@ static int make_UDP_socket(unsigned short int port);
#define UTIME_OMIT ((1l << 30) - 2l)
#ifndef ANDROID
#ifndef ATARI
#ifndef __APPLE__
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
......@@ -136,6 +141,7 @@ static int make_UDP_socket(unsigned short int port);
#endif
#endif
#endif
#endif
#if defined ANDROID
extern int lin,col;
......@@ -1242,6 +1248,8 @@ void c_close(PARAMETER *plist,int e) {
}
#ifndef HAVE_EXECVPE
extern char **environ;
int execvpe(const char *program, char **argv, char **envp) {
char **saved = environ;
int rc;
......
......@@ -18,6 +18,9 @@
#define ioctlsocket(a,b,c) ioctl(a,b,c)
#endif
#ifdef __APPLE__
/* stuff for OSX */
#endif
/* File handling structures */
......
......@@ -1659,8 +1659,12 @@ static void gotolabel(int pc2,int type) {
batch=1;
// TODO:
} else {
#ifndef __APPLE__
void *func=(void *)pc2;
goto *func;
#else
printf("ERROR/Macintosh MacOS X\nSee Bug 18658 Bugzilla.\nGOTO not possible.\n");
#endif
}
}
}
......
......@@ -31,6 +31,10 @@
#else
#define key_t int
#endif
#ifdef __APPLE__
#define key_t int
#endif
#define FALSE 0
#define TRUE (!FALSE)
......
......@@ -6,7 +6,7 @@
* COPYING for details
*/
#if defined WINDOWS || defined ATARI
#if defined WINDOWS || defined ATARI || defined __APPLE__
#define key_t int
#endif
......
......@@ -12,7 +12,9 @@
#include <unistd.h>
#include <string.h>
#include <termios.h>
#ifndef __APPLE__
#include <linux/fb.h>
#endif
#include <sys/ioctl.h>
#include "terminal.h"
......
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