HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #378

Ticket #378: ioquake-r1289-haiku.diff

File ioquake-r1289-haiku.diff, 4.5 KB (added by aldeck, 5 years ago)
  • code/tools/lcc/etc/lcc.c

     
    4848extern int suffix(char *, char *[], int); 
    4949extern char *tempname(char *); 
    5050 
    51 #ifndef __sun 
     51#if !defined(__sun) && !defined(__HAIKU__) 
    5252extern int getpid(void); 
    5353#endif 
    5454 
    … …  
    219219#include <process.h> 
    220220#else 
    221221#define _P_WAIT 0 
    222 #ifndef __sun 
     222#if !defined(__sun) && !defined(__HAIKU__) 
    223223extern int fork(void); 
    224224#endif 
    225225extern int wait(int *); 
  • code/renderer/tr_image_pcx.c

     
    4545        unsigned short  palette_type; 
    4646        unsigned short  hscreensize, vscreensize; 
    4747        char    filler[54]; 
    48         unsigned char   data[]; 
     48        unsigned char   *data; 
    4949} pcx_t; 
    5050 
    5151void R_LoadPCX ( const char *filename, byte **pic, int *width, int *height) 
  • code/qcommon/q_platform.h

     
    3232 
    3333#else 
    3434 
    35 #if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY) 
     35#if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY) && !defined(__HAIKU__) 
    3636#define id386 1 
    3737#else 
    3838#define id386 0 
    … …  
    168168 
    169169#endif 
    170170 
     171//================================================================= HAIKU === 
     172 
     173#ifdef __HAIKU__ 
     174 
     175#define OS_STRING "haiku" 
     176#define ID_INLINE inline 
     177#define PATH_SEP '/' 
     178#define ARCH_STRING "i386" 
     179#define Q3_LITTLE_ENDIAN 
     180#define DLL_EXT ".so" 
     181 
     182#endif 
     183 
    171184//=================================================================== BSD === 
    172185 
    173186#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) 
  • code/sys/sys_main.c

     
    3131#include <ctype.h> 
    3232#include <errno.h> 
    3333 
     34#ifdef __HAIKU__ 
     35#define SIGIOT SIGABRT 
     36#endif 
     37 
    3438#ifndef DEDICATED 
    3539#ifdef USE_LOCAL_HEADERS 
    3640#       include "SDL.h" 
  • Makefile

     
    284284else # ifeq Linux 
    285285 
    286286############################################################################# 
     287# SETUP AND BUILD -- HAIKU 
     288############################################################################# 
     289 
     290## Defaults 
     291LIB=lib 
     292 
     293INSTALL=install 
     294MKDIR=mkdir 
     295 
     296ifeq ($(PLATFORM),haiku) 
     297 
     298  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ 
     299    -pipe -DUSE_ICON $(shell sdl-config --cflags) 
     300 
     301  ifeq ($(USE_OPENAL),1) 
     302    BASE_CFLAGS += -DUSE_OPENAL 
     303    ifeq ($(USE_OPENAL_DLOPEN),1) 
     304      BASE_CFLAGS += -DUSE_OPENAL_DLOPEN 
     305    endif 
     306  endif 
     307 
     308  ifeq ($(USE_CURL),1) 
     309    BASE_CFLAGS += -DUSE_CURL 
     310    ifeq ($(USE_CURL_DLOPEN),1) 
     311      BASE_CFLAGS += -DUSE_CURL_DLOPEN 
     312    endif 
     313  endif 
     314 
     315  ifeq ($(USE_CODEC_VORBIS),1) 
     316    BASE_CFLAGS += -DUSE_CODEC_VORBIS 
     317  endif 
     318 
     319  OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer 
     320 
     321  ifeq ($(ARCH),i386) 
     322    OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \ 
     323      -funroll-loops -falign-loops=2 -falign-jumps=2 \ 
     324      -falign-functions=2 -fstrength-reduce 
     325    HAVE_VM_COMPILED=true 
     326  endif 
     327 
     328  ifneq ($(HAVE_VM_COMPILED),true) 
     329    BASE_CFLAGS += -DNO_VM_COMPILED 
     330  endif 
     331 
     332  SHLIBEXT=so 
     333  SHLIBCFLAGS=-fPIC 
     334  SHLIBLDFLAGS=-shared $(LDFLAGS) 
     335 
     336  THREAD_LDFLAGS=-lpthread 
     337  LDFLAGS=-lnetwork 
     338 
     339  CLIENT_LDFLAGS=$(shell sdl-config --libs) -lGL 
     340 
     341  ifeq ($(USE_OPENAL),1) 
     342    ifneq ($(USE_OPENAL_DLOPEN),1) 
     343      CLIENT_LDFLAGS += -lopenal 
     344    endif 
     345  endif 
     346 
     347  ifeq ($(USE_CURL),1) 
     348    ifneq ($(USE_CURL_DLOPEN),1) 
     349      CLIENT_LDFLAGS += -lcurl 
     350    endif 
     351  endif 
     352 
     353  ifeq ($(USE_CODEC_VORBIS),1) 
     354    CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg 
     355  endif 
     356 
     357  ifeq ($(ARCH),i386) 
     358    # linux32 make ... 
     359    BASE_CFLAGS += -m32 
     360    LDFLAGS+=-m32 
     361  endif 
     362 
     363  DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0 
     364  RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE) 
     365 
     366else # ifeq Haiku 
     367 
     368############################################################################# 
    287369# SETUP AND BUILD -- MAC OS X 
    288370############################################################################# 
    289371 
    … …  
    706788  SHLIBLDFLAGS=-shared 
    707789 
    708790endif #Linux 
     791endif #Haiku 
    709792endif #darwin 
    710793endif #mingw32 
    711794endif #FreeBSD 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/