Import changesets (part 4) 428,457,460,467: defines for openbsd etc.
This commit is contained in:
		
							parent
							
								
									f466577673
								
							
						
					
					
						commit
						6c96c41ee4
					
				
					 5 changed files with 40 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,11 @@
 | 
			
		|||
version 0.9.24:
 | 
			
		||||
 | 
			
		||||
- Import 409,410: ARM EABI by Daniel Glöckner
 | 
			
		||||
- Import changesets (part 4) 428,457,460,467: defines for openbsd etc.
 | 
			
		||||
 | 
			
		||||
- Use _WIN32 for a windows hosted tcc and define it for the PE target,
 | 
			
		||||
  otherwise define __unix / __linux (Detlef Riekenberg)
 | 
			
		||||
 | 
			
		||||
- Import changesets (part 3) 409,410: ARM EABI by Daniel Glöckner
 | 
			
		||||
 | 
			
		||||
- Some in-between fixes:
 | 
			
		||||
  TCC -E no longer hangs with macro calls involving newlines.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -5,7 +5,10 @@ include config.mak
 | 
			
		|||
 | 
			
		||||
CFLAGS+=-g -Wall
 | 
			
		||||
ifndef CONFIG_WIN32
 | 
			
		||||
LIBS=-ldl
 | 
			
		||||
LIBS=-lm
 | 
			
		||||
ifndef CONFIG_NOLDL
 | 
			
		||||
LIBS+=-ldl
 | 
			
		||||
endif
 | 
			
		||||
BCHECK_O=bcheck.o
 | 
			
		||||
endif
 | 
			
		||||
CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										7
									
								
								bcheck.c
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								bcheck.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -21,7 +21,7 @@
 | 
			
		|||
#include <stdio.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#ifndef __FreeBSD__
 | 
			
		||||
#if !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__OpenBSD__)
 | 
			
		||||
#include <malloc.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -36,8 +36,9 @@
 | 
			
		|||
 | 
			
		||||
#define HAVE_MEMALIGN
 | 
			
		||||
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__dietlibc__)
 | 
			
		||||
#warning Bound checking not fully supported on FreeBSD
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__dietlibc__) \
 | 
			
		||||
    || defined(__UCLIBC__) || defined(__OpenBSD__)
 | 
			
		||||
#warning Bound checking not fully supported in this environment.
 | 
			
		||||
#undef CONFIG_TCC_MALLOC_HOOKS
 | 
			
		||||
#undef HAVE_MEMALIGN
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								configure
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								configure
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -68,6 +68,12 @@ case $targetos in
 | 
			
		|||
MINGW32*)
 | 
			
		||||
mingw32="yes"
 | 
			
		||||
;;
 | 
			
		||||
DragonFly)
 | 
			
		||||
noldl="yes"
 | 
			
		||||
;;
 | 
			
		||||
OpenBSD)
 | 
			
		||||
noldl="yes"
 | 
			
		||||
;;
 | 
			
		||||
*) ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -302,6 +308,9 @@ else
 | 
			
		|||
  echo "Unsupported CPU"
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
if test "$noldl" = "yes" ; then
 | 
			
		||||
  echo "CONFIG_NOLDL=yes" >> config.mak
 | 
			
		||||
fi
 | 
			
		||||
if test "$mingw32" = "yes" ; then
 | 
			
		||||
  echo "CONFIG_WIN32=yes" >> config.mak
 | 
			
		||||
  echo "#define CONFIG_WIN32 1" >> $TMPH
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								tcc.c
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								tcc.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -738,7 +738,8 @@ int __stdcall VirtualProtect(void*,unsigned long,unsigned long,unsigned long*);
 | 
			
		|||
  #define strtof (float)strtod
 | 
			
		||||
  #define strtoll (long long)strtol
 | 
			
		||||
#endif
 | 
			
		||||
#elif defined(TCC_UCLIBC) || defined(__FreeBSD__)
 | 
			
		||||
#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) || defined(__DragonFly__) \
 | 
			
		||||
    || defined(__OpenBSD__)
 | 
			
		||||
/* currently incorrect */
 | 
			
		||||
long double strtold(const char *nptr, char **endptr)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -10013,9 +10014,15 @@ TCCState *tcc_new(void)
 | 
			
		|||
    tcc_define_symbol(s, "arm", NULL);
 | 
			
		||||
    tcc_define_symbol(s, "__APCS_32__", NULL);
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(linux)
 | 
			
		||||
#ifdef TCC_TARGET_PE
 | 
			
		||||
    tcc_define_symbol(s, "_WIN32", NULL);
 | 
			
		||||
#else
 | 
			
		||||
    tcc_define_symbol(s, "__unix__", NULL);
 | 
			
		||||
    tcc_define_symbol(s, "__unix", NULL);
 | 
			
		||||
#if defined(__linux)
 | 
			
		||||
    tcc_define_symbol(s, "__linux__", NULL);
 | 
			
		||||
    tcc_define_symbol(s, "linux", NULL);
 | 
			
		||||
    tcc_define_symbol(s, "__linux", NULL);
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
    /* tiny C specific defines */
 | 
			
		||||
    tcc_define_symbol(s, "__TINYC__", NULL);
 | 
			
		||||
| 
						 | 
				
			
			@ -10025,7 +10032,6 @@ TCCState *tcc_new(void)
 | 
			
		|||
    tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");
 | 
			
		||||
#ifdef TCC_TARGET_PE
 | 
			
		||||
    tcc_define_symbol(s, "__WCHAR_TYPE__", "unsigned short");
 | 
			
		||||
    tcc_define_symbol(s, "_WIN32", NULL);
 | 
			
		||||
#else
 | 
			
		||||
    tcc_define_symbol(s, "__WCHAR_TYPE__", "int");
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue