Changeset - r4324:3b5d16688ac3
[Not reviewed]
master
0 3 0
truelight - 18 years ago 2006-08-20 13:48:04
truelight@openttd.org
(svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
3 files changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
Makefile
Show inline comments
 
@@ -508,12 +508,16 @@ endif
 

	
 
# enables/disables assert()
 
ifdef DISABLE_ASSERTS
 
CFLAGS += -DNDEBUG
 
endif
 

	
 
ifdef NO_THREADS
 
CFLAGS += -DNO_THREADS
 
endif
 

	
 
# automatically disables asserts for release
 
ifdef RELEASE
 
ifndef ENABLE_ASSERTS
 
CFLAGS += -DNDEBUG
 
endif
 
endif
makefiledir/Makefile.config_writer
Show inline comments
 
@@ -29,12 +29,14 @@ CONFIG_LINE=@$(SHELL) -c 'echo $(1)' >> 
 
	$(call CONFIG_LINE,WITH_NETWORK:=$(WITH_NETWORK))
 
	$(call CONFIG_LINE,DEDICATED:=$(DEDICATED))
 
	$(call CONFIG_LINE,)
 

	
 
	$(call CONFIG_LINE,\# Disable asserts. Leave them on for easier bug finding)
 
	$(call CONFIG_LINE,DISABLE_ASSERTS:=$(DISABLE_ASSERTS))
 
	$(call CONFIG_LINE,\# Disable threads. Useful if you do not like it and for testing)
 
	$(call CONFIG_LINE,NO_THREADS:=$(NO_THREADS))
 
	$(call CONFIG_LINE,)
 

	
 
	$(call CONFIG_LINE,\# See Makefile for details on these paths)
 
	$(call CONFIG_LINE,\# Folders should not end with /)
 
	$(call CONFIG_LINE,INSTALL:=$(INSTALL))
 
	$(call CONFIG_LINE,PREFIX:=$(PREFIX))
thread.c
Show inline comments
 
/* $Id$ */
 

	
 
#include "stdafx.h"
 
#include "thread.h"
 
#include <stdlib.h>
 

	
 
#if defined(__AMIGA__) || defined(__MORPHOS__)
 
#if defined(__AMIGA__) || defined(__MORPHOS__) || defined(NO_THREADS)
 
OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void* arg) { return NULL; }
 
void* OTTDJoinThread(OTTDThread* t) { return NULL; }
 
void OTTDExitThread() { NOT_REACHED(); };
 
void OTTDExitThread(void) { NOT_REACHED(); };
 

	
 
#elif defined(__OS2__)
 

	
 
#define INCL_DOS
 
#include <os2.h>
 
#include <process.h>
0 comments (0 inline, 0 general)