Ticket #280: dmd.1.052.diff
| File dmd.1.052.diff, 29.3 KB (added by haikubot, 6 years ago) |
|---|
-
new file dmd/src/dmd/.hgignore
diff -r cb833e4e6fba dmd/src/dmd/.hgignore
- + 1 syntax: glob 2 ext 3 *.o 4 *.obj 5 *.map -
dmd/src/dmd/backend/cg87.c
diff -r cb833e4e6fba dmd/src/dmd/backend/cg87.c
a b 605 605 static double dval[7] = 606 606 {0.0,1.0,PI,LOG2T,LOG2E,LOG2,LN2}; 607 607 static long double ldval[7] = 608 #if __APPLE__ || __FreeBSD__ || __sun&&__SVR4 608 609 #ifdef B_HAIKU_VERSION 610 #define __HAVE_HAIKU__ 611 #define M_PIl 0x1.921fb54442d1846ap+1L // 3.14159 fldpi 612 #define M_LN2l 0x1.62e42fefa39ef358p-1L // 0.693147 fldln2 613 #define M_LOG2El 0x1.71547652b82fe178p+0L // 1.4427 fldl2e 614 #endif 615 616 #if __APPLE__ || __FreeBSD__ || __sun&&__SVR4 609 617 #define M_PIl 0x1.921fb54442d1846ap+1L // 3.14159 fldpi 610 618 #define M_LOG2T_L 0x1.a934f0979a3715fcp+1L // 3.32193 fldl2t 611 619 #define M_LOG2El 0x1.71547652b82fe178p+0L // 1.4427 fldl2e -
dmd/src/dmd/backend/dwarf.c
diff -r cb833e4e6fba dmd/src/dmd/backend/dwarf.c
a b 22 22 #include <malloc.h> 23 23 #endif 24 24 25 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 25 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined (B_HAIKU_VERSION) 26 26 #include <signal.h> 27 27 #include <unistd.h> 28 28 #include <errno.h> -
dmd/src/dmd/backend/evalu8.c
diff -r cb833e4e6fba dmd/src/dmd/backend/evalu8.c
a b 24 24 #include <fp.h> 25 25 #endif 26 26 27 #if __FreeBSD__ 27 #if __FreeBSD__ 28 28 #define fmodl fmod 29 29 #endif 30 30 31 #ifdef B_HAIKU_VERSION 32 #include <float.h> 33 #include <posix/math.h> 34 #include <math.h> 35 #include <fenv.h> 36 #define fmodl fmod 37 double fabsl( double __x) 38 { return __builtin_fabsl(__x); } 39 #endif 40 31 41 #include "cc.h" 32 42 #include "oper.h" /* OPxxxx definitions */ 33 43 #include "global.h" … … 42 52 43 53 extern void error(const char *filename, unsigned linnum, const char *format, ...); 44 54 45 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 55 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined (B_HAIKU_VERSION) 46 56 int _status87() 47 57 { 58 #ifndef B_HAIKU_VERSION 48 59 return fetestexcept(FE_ALL_EXCEPT); 60 #else 61 return 0; 62 #endif 49 63 } 50 64 51 65 void _clear87() 52 66 { 67 #ifndef B_HAIKU_VERSION 53 68 feclearexcept(FE_ALL_EXCEPT); 69 #endif 54 70 } 55 71 #endif 56 72 -
dmd/src/dmd/backend/global.h
diff -r cb833e4e6fba dmd/src/dmd/backend/global.h
a b 545 545 void dwarf_CFA_args_size(size_t sz); 546 546 #endif 547 547 548 #if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 548 #if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS || defined(B_HAIKU_VERSION) 549 549 550 void elfobj_gotref(symbol *s); 550 551 symbol *elfobj_getGOTsym(); 551 552 elem * exp_isconst(); -
dmd/src/dmd/backend/os.c
diff -r cb833e4e6fba dmd/src/dmd/backend/os.c
a b 26 26 #include <sys\stat.h> 27 27 #endif 28 28 29 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 29 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 30 30 #include <sys/types.h> 31 31 #include <sys/stat.h> 32 32 #include <fcntl.h> … … 658 658 if (!find) 659 659 return 0; 660 660 return (find->attribute & FA_DIREC) ? 2 : 1; 661 #elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 661 #elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 662 662 struct stat buf; 663 663 664 664 return stat(name,&buf) == 0; /* file exists if stat succeeded */ … … 735 735 736 736 int file_write(char *name, void *buffer, unsigned len) 737 737 { 738 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 738 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 739 739 int fd; 740 740 ssize_t numwritten; 741 741 … … 811 811 812 812 int file_createdirs(char *name) 813 813 { 814 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 814 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 815 815 return 1; 816 816 #endif 817 817 #if _WIN32 … … 861 861 } 862 862 #endif 863 863 864 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 864 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 865 865 int os_critsecsize() 866 866 { 867 867 return sizeof(pthread_mutex_t); -
dmd/src/dmd/backend/strtold.c
diff -r cb833e4e6fba dmd/src/dmd/backend/strtold.c
a b 16 16 #include <float.h> 17 17 #include <string.h> 18 18 #include <math.h> 19 #include <fenv.h>20 19 #if _WIN32 21 20 #include <fltpnt.h> 22 21 #endif 23 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 22 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined (B_HAIKU_VERSION) 24 23 #include <errno.h> 25 24 #endif 26 25 26 #ifdef B_HAIKU_VERSION 27 ///#include <cpp/tr1_impl/cfenv> 28 /// #include <fenv.h> 29 #else 30 31 #include <fenv.h> 32 #endif 33 34 27 35 #if _WIN32 28 36 // from \sc\src\include\setlocal.h 29 37 extern char * __cdecl __locale_decpoint; 30 38 void __pascal __set_errno (int an_errno); 31 39 #endif 32 40 33 #if _WIN32 || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 41 #if _WIN32 || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 34 42 35 43 #if __GCC__ 36 44 … … 101 109 const char *pinit = p; 102 110 static char infinity[] = "infinity"; 103 111 static char nans[] = "nans"; 104 fenv_t flagp;105 112 unsigned int old_cw; 106 113 unsigned int old_status; 107 114 108 115 #if _WIN32 116 fenv_t flagp; 109 117 fegetenv(&flagp); /* Store all exceptions, and current status word */ 110 118 if (_8087) 111 119 { -
dmd/src/dmd/constfold.c
diff -r cb833e4e6fba dmd/src/dmd/constfold.c
a b 39 39 #define fmodl fmod // hack for now, fix later 40 40 #endif 41 41 42 #ifdef B_HAIKU_VERSION 43 #define fmodl fmod //Dimux: same applies here 44 /* %% fix? */ 45 extern "C" bool real_isnan (const real_t *); 46 #endif 47 48 42 49 #define LOG 0 43 50 44 51 Expression *expType(Type *type, Expression *e) -
dmd/src/dmd/e2ir.c
diff -r cb833e4e6fba dmd/src/dmd/e2ir.c
a b 11 11 #include <stdio.h> 12 12 #include <string.h> 13 13 #include <time.h> 14 15 #ifndef B_HAIKU_VERSION 14 16 #include <complex.h> 15 16 17 #include "port.h" 17 18 19 #else 20 #include <complex> 21 #include "root/port.h" 22 23 #endif 24 25 18 26 #include "lexer.h" 19 27 #include "expression.h" 20 28 #include "mtype.h" -
dmd/src/dmd/expression.c
diff -r cb833e4e6fba dmd/src/dmd/expression.c
a b 8 8 // in artistic.txt, or the GNU General Public License in gnu.txt. 9 9 // See the included readme.txt for details. 10 10 11 #ifdef B_HAIKU_VERSION 12 13 #include <complex> 14 #include <posix/math.h> 15 #include <math.h> 16 17 #include <posix/stdlib.h> 18 19 #else 20 21 #include <math.h> 22 23 #if _MSC_VER 24 #include <complex> 25 #else 26 #include <complex.h> 27 #endif 28 29 30 #endif 31 11 32 #include <stdio.h> 12 33 #include <stdlib.h> 13 34 #include <ctype.h> 14 #include <math.h>15 35 #include <assert.h> 16 #if _MSC_VER 17 #include <complex> 18 #else 19 #include <complex.h> 20 #endif 36 21 37 22 38 #if _WIN32 && __DMC__ 23 39 extern "C" char * __cdecl __locale_decpoint; 24 40 #endif 25 41 42 43 44 26 45 #include "rmem.h" 27 46 #include "port.h" 28 47 … … 1641 1660 #if __APPLE__ 1642 1661 return (__inline_isnan(x1) && __inline_isnan(x2)) || 1643 1662 #else 1663 #ifdef B_HAIKU_VERSION 1664 return (__isnan(x1) && __isnan(x2)) || 1665 #else 1644 1666 return (isnan(x1) && isnan(x2)) || 1667 #endif 1645 1668 #endif 1646 1669 /* In some cases, the REALPAD bytes get garbage in them, 1647 1670 * so be sure and ignore them. … … 1697 1720 real_t r = strtold(buffer, NULL); 1698 1721 __locale_decpoint = save; 1699 1722 #else 1723 #ifdef B_HAIKU_VERSION 1724 real_t r = (real_t)strtod(buffer, NULL); 1725 #else 1700 1726 real_t r = strtold(buffer, NULL); 1727 #endif 1701 1728 #endif 1702 1729 if (r == value) // if exact duplication 1703 1730 buf->writestring(buffer); … … 1747 1774 * 0X1.9P+2 => 19P2 1748 1775 */ 1749 1776 1750 #if __APPLE__ 1777 #if __APPLE__ 1751 1778 if (__inline_isnan(value)) 1752 1779 #else 1780 #ifdef B_HAIKU_VERSION 1781 if (__isnan(value)) 1782 #else 1753 1783 if (isnan(value)) 1784 #endif 1754 1785 #endif 1755 1786 buf->writestring("NAN"); // no -NAN bugs 1756 1787 else -
new file dmd/src/dmd/haiku.mak
diff -r cb833e4e6fba dmd/src/dmd/haiku.mak
- + 1 2 C=backend 3 TK=tk 4 ROOT=root 5 6 CC=g++ -m32 7 8 #OPT=-g -g3 9 #OPT=-O2 10 11 #COV=-fprofile-arcs -ftest-coverage 12 13 #GFLAGS = -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 $(COV) 14 GFLAGS = -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -O2 15 16 17 INCL_COMPLEX_H=/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/include/c++/4.3.3/ 18 19 #CFLAGS = $(GFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH -I$(INCL_COMPLEX_H) 20 CFLAGS = $(GFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH -I$(INCL_COMPLEX_H) -DB_HAIKU_VERSION 21 MFLAGS = $(GFLAGS) -I$C -I$(TK) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH 22 23 CH= $C/cc.h $C/global.h $C/parser.h $C/oper.h $C/code.h $C/type.h \ 24 $C/dt.h $C/cgcv.h $C/el.h $C/iasm.h 25 TOTALH= 26 27 DMD_OBJS = \ 28 access.o array.o attrib.o bcomplex.o bit.o blockopt.o \ 29 cast.o code.o cg.o cg87.o cgcod.o cgcs.o cgcv.o cgelem.o cgen.o \ 30 cgreg.o cgsched.o class.o cod1.o cod2.o cod3.o cod4.o cod5.o \ 31 constfold.o irstate.o dchar.o cond.o debug.o \ 32 declaration.o dsymbol.o dt.o dump.o e2ir.o ee.o eh.o el.o \ 33 dwarf.o enum.o evalu8.o expression.o func.o gdag.o gflow.o \ 34 glocal.o gloop.o glue.o gnuc.o go.o gother.o html.o iasm.o id.o \ 35 identifier.o impcnvtab.o import.o inifile.o init.o inline.o \ 36 lexer.o link.o lstring.o mangle.o mars.o rmem.o module.o msc.o mtype.o \ 37 nteh.o cppmangle.o opover.o optimize.o os.o out.o outbuf.o \ 38 parse.o ph.o ptrntab.o root.o rtlsym.o s2ir.o scope.o statement.o \ 39 stringtable.o struct.o csymbol.o template.o tk.o tocsym.o todt.o \ 40 type.o typinf.o util.o var.o version.o strtold.o utf.o staticassert.o \ 41 unialpha.o toobj.o toctype.o toelfdebug.o entity.o doc.o macro.o \ 42 hdrgen.o delegatize.o aa.o ti_achar.o toir.o interpret.o traits.o \ 43 builtin.o clone.o aliasthis.o \ 44 man.o arrayop.o port.o response.o async.o json.o \ 45 libelf.o elfobj.o 46 47 SRC = win32.mak linux.mak osx.mak freebsd.mak solaris.mak \ 48 mars.c enum.c struct.c dsymbol.c import.c idgen.c impcnvgen.c \ 49 identifier.c mtype.c expression.c optimize.c template.h \ 50 template.c lexer.c declaration.c cast.c cond.h cond.c link.c \ 51 aggregate.h parse.c statement.c constfold.c version.h version.c \ 52 inifile.c iasm.c module.c scope.c dump.c init.h init.c attrib.h \ 53 attrib.c opover.c class.c mangle.c bit.c tocsym.c func.c inline.c \ 54 access.c complex_t.h irstate.h irstate.c glue.c msc.c ph.c tk.c \ 55 s2ir.c todt.c e2ir.c util.c identifier.h parse.h objfile.h \ 56 scope.h enum.h import.h mars.h module.h mtype.h dsymbol.h \ 57 declaration.h lexer.h expression.h irstate.h statement.h eh.c \ 58 utf.h utf.c staticassert.h staticassert.c unialpha.c \ 59 typinf.c toobj.c toctype.c tocvdebug.c toelfdebug.c entity.c \ 60 doc.h doc.c macro.h macro.c hdrgen.h hdrgen.c arraytypes.h \ 61 delegatize.c toir.h toir.c interpret.c traits.c cppmangle.c \ 62 builtin.c clone.c lib.h libomf.c libelf.c libmach.c arrayop.c \ 63 aliasthis.h aliasthis.c json.h json.c \ 64 $C/cdef.h $C/cc.h $C/oper.h $C/ty.h $C/optabgen.c \ 65 $C/global.h $C/parser.h $C/code.h $C/type.h $C/dt.h $C/cgcv.h \ 66 $C/el.h $C/iasm.h $C/rtlsym.h $C/html.h \ 67 $C/bcomplex.c $C/blockopt.c $C/cg.c $C/cg87.c \ 68 $C/cgcod.c $C/cgcs.c $C/cgcv.c $C/cgelem.c $C/cgen.c $C/cgobj.c \ 69 $C/cgreg.c $C/var.c $C/strtold.c \ 70 $C/cgsched.c $C/cod1.c $C/cod2.c $C/cod3.c $C/cod4.c $C/cod5.c \ 71 $C/code.c $C/symbol.c $C/debug.c $C/dt.c $C/ee.c $C/el.c \ 72 $C/evalu8.c $C/go.c $C/gflow.c $C/gdag.c \ 73 $C/gother.c $C/glocal.c $C/gloop.c $C/html.c $C/newman.c \ 74 $C/nteh.c $C/os.c $C/out.c $C/outbuf.c $C/ptrntab.c $C/rtlsym.c \ 75 $C/type.c $C/melf.h $C/mach.h $C/bcomplex.h \ 76 $C/cdeflnx.h $C/outbuf.h $C/token.h $C/tassert.h \ 77 $C/elfobj.c $C/cv4.h $C/dwarf2.h $C/cpp.h $C/exh.h $C/go.h \ 78 $C/dwarf.c $C/dwarf.h $C/aa.h $C/aa.c $C/tinfo.h $C/ti_achar.c \ 79 $C/machobj.c \ 80 $(TK)/filespec.h $(TK)/mem.h $(TK)/list.h $(TK)/vec.h \ 81 $(TK)/filespec.c $(TK)/mem.c $(TK)/vec.c $(TK)/list.c \ 82 $(ROOT)/dchar.h $(ROOT)/dchar.c $(ROOT)/lstring.h \ 83 $(ROOT)/lstring.c $(ROOT)/root.h $(ROOT)/root.c $(ROOT)/array.c \ 84 $(ROOT)/rmem.h $(ROOT)/rmem.c $(ROOT)/port.h $(ROOT)/port.c \ 85 $(ROOT)/gnuc.h $(ROOT)/gnuc.c $(ROOT)/man.c \ 86 $(ROOT)/stringtable.h $(ROOT)/stringtable.c \ 87 $(ROOT)/response.c $(ROOT)/async.h $(ROOT)/async.c 88 89 90 all: dmd 91 92 dmd: id.o optabgen $(DMD_OBJS) 93 gcc -m32 -lstdc++ $(COV) $(DMD_OBJS) -o dmd 94 95 clean: 96 rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \ 97 impcnvtab.c optabgen debtab.c optab.c cdxxx.c elxxx.c fltables.c \ 98 tytab.c core \ 99 *.cov *.gcda *.gcno 100 101 ######## optabgen generates some source 102 103 optabgen: $C/optabgen.c $C/cc.h $C/oper.h 104 $(CC) $(MFLAGS) $< -o optabgen 105 ./optabgen 106 107 debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c : optabgen 108 ./optabgen 109 110 ######## idgen generates some source 111 112 id.h id.c : idgen 113 ./idgen 114 115 idgen : idgen.c 116 $(CC) idgen.c -o idgen 117 118 id.o : id.h id.c 119 $(CC) -c $(CFLAGS) id.c 120 121 ######### impcnvgen generates some source 122 123 impcnvtab.c : impcnvgen 124 ./impcnvgen 125 126 impcnvgen : mtype.h impcnvgen.c 127 $(CC) $(CFLAGS) impcnvgen.c -o impcnvgen 128 129 ######### 130 131 aa.o: $C/aa.h $C/tinfo.h $C/aa.c 132 $(CC) -c $(MFLAGS) -I. $C/aa.c 133 134 access.o: access.c 135 $(CC) -c $(CFLAGS) $< 136 137 aliasthis.o: aliasthis.c 138 $(CC) -c $(CFLAGS) $< 139 140 array.o: $(ROOT)/array.c 141 $(CC) -c $(GFLAGS) -I$(ROOT) $< 142 143 arrayop.o: arrayop.c 144 $(CC) -c $(CFLAGS) $< 145 146 async.o: $(ROOT)/async.c 147 $(CC) -c $(GFLAGS) -I$(ROOT) $< 148 149 attrib.o: attrib.c 150 $(CC) -c $(CFLAGS) $< 151 152 bcomplex.o: $C/bcomplex.c 153 $(CC) -c $(MFLAGS) $C/bcomplex.c 154 155 bit.o: expression.h bit.c 156 $(CC) -c -I$(ROOT) $(MFLAGS) bit.c 157 158 blockopt.o: $C/blockopt.c 159 $(CC) -c $(MFLAGS) $C/blockopt.c 160 161 builtin.o: builtin.c 162 $(CC) -c $(CFLAGS) $< 163 164 cast.o: cast.c 165 $(CC) -c $(CFLAGS) $< 166 167 cg.o: fltables.c $C/cg.c 168 $(CC) -c $(MFLAGS) -I. $C/cg.c 169 170 cg87.o: $C/cg87.c 171 $(CC) -c $(MFLAGS) $< 172 173 cgcod.o: $C/cgcod.c 174 $(CC) -c $(MFLAGS) -I. $< 175 176 cgcs.o: $C/cgcs.c 177 $(CC) -c $(MFLAGS) $< 178 179 cgcv.o: $C/cgcv.c 180 $(CC) -c $(MFLAGS) $< 181 182 cgelem.o: $C/rtlsym.h $C/cgelem.c 183 $(CC) -c $(MFLAGS) -I. $C/cgelem.c 184 185 cgen.o: $C/rtlsym.h $C/cgen.c 186 $(CC) -c $(MFLAGS) $C/cgen.c 187 188 cgobj.o: $C/cgobj.c 189 $(CC) -c $(MFLAGS) $< 190 191 cgreg.o: $C/cgreg.c 192 $(CC) -c $(MFLAGS) $< 193 194 cgsched.o: $C/rtlsym.h $C/cgsched.c 195 $(CC) -c $(MFLAGS) $C/cgsched.c 196 197 class.o: class.c 198 $(CC) -c $(CFLAGS) $< 199 200 clone.o: clone.c 201 $(CC) -c $(CFLAGS) $< 202 203 cod1.o: $C/rtlsym.h $C/cod1.c 204 $(CC) -c $(MFLAGS) $C/cod1.c 205 206 cod2.o: $C/rtlsym.h $C/cod2.c 207 $(CC) -c $(MFLAGS) $C/cod2.c 208 209 cod3.o: $C/rtlsym.h $C/cod3.c 210 $(CC) -c $(MFLAGS) $C/cod3.c 211 212 cod4.o: $C/cod4.c 213 $(CC) -c $(MFLAGS) $< 214 215 cod5.o: $C/cod5.c 216 $(CC) -c $(MFLAGS) $< 217 218 code.o: $C/code.c 219 $(CC) -c $(MFLAGS) $< 220 221 constfold.o: constfold.c 222 $(CC) -c $(CFLAGS) $< 223 224 irstate.o: irstate.h irstate.c 225 $(CC) -c $(MFLAGS) irstate.c 226 227 csymbol.o : $C/symbol.c 228 $(CC) -c $(MFLAGS) $C/symbol.c -o csymbol.o 229 230 dchar.o: $(ROOT)/dchar.c 231 $(CC) -c $(GFLAGS) -I$(ROOT) $< 232 233 cond.o: cond.c 234 $(CC) -c $(CFLAGS) $< 235 236 cppmangle.o: cppmangle.c 237 $(CC) -c $(CFLAGS) $< 238 239 debug.o: $C/debug.c 240 $(CC) -c $(MFLAGS) -I. $< 241 242 declaration.o: declaration.c 243 $(CC) -c $(CFLAGS) $< 244 245 delegatize.o: delegatize.c 246 $(CC) -c $(CFLAGS) $< 247 248 doc.o: doc.c 249 $(CC) -c $(CFLAGS) $< 250 251 dsymbol.o: dsymbol.c 252 $(CC) -c $(CFLAGS) $< 253 254 dt.o: $C/dt.h $C/dt.c 255 $(CC) -c $(MFLAGS) $C/dt.c 256 257 dump.o: dump.c 258 $(CC) -c $(CFLAGS) $< 259 260 dwarf.o: $C/dwarf.h $C/dwarf.c 261 $(CC) -c $(MFLAGS) -I. $C/dwarf.c 262 263 e2ir.o: $C/rtlsym.h expression.h toir.h e2ir.c 264 $(CC) -c -I$(ROOT) $(MFLAGS) e2ir.c 265 266 ee.o: $C/ee.c 267 $(CC) -c $(MFLAGS) $< 268 269 eh.o : $C/cc.h $C/code.h $C/type.h $C/dt.h eh.c 270 $(CC) -c $(MFLAGS) eh.c 271 272 el.o: $C/rtlsym.h $C/el.h $C/el.c 273 $(CC) -c $(MFLAGS) $C/el.c 274 275 elfobj.o: $C/elfobj.c 276 $(CC) -c $(MFLAGS) $< 277 278 entity.o: entity.c 279 $(CC) -c $(CFLAGS) $< 280 281 enum.o: enum.c 282 $(CC) -c $(CFLAGS) $< 283 284 evalu8.o: $C/evalu8.c 285 $(CC) -c $(MFLAGS) $< 286 287 expression.o: expression.c 288 $(CC) -c $(CFLAGS) $< 289 290 func.o: func.c 291 $(CC) -c $(CFLAGS) $< 292 293 gdag.o: $C/gdag.c 294 $(CC) -c $(MFLAGS) $< 295 296 gflow.o: $C/gflow.c 297 $(CC) -c $(MFLAGS) $< 298 299 #globals.o: globals.c 300 # $(CC) -c $(CFLAGS) $< 301 302 glocal.o: $C/rtlsym.h $C/glocal.c 303 $(CC) -c $(MFLAGS) $C/glocal.c 304 305 gloop.o: $C/gloop.c 306 $(CC) -c $(MFLAGS) $< 307 308 glue.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h glue.c 309 $(CC) -c $(MFLAGS) -I$(ROOT) glue.c 310 311 gnuc.o: $(ROOT)/gnuc.h $(ROOT)/gnuc.c 312 $(CC) -c $(GFLAGS) $(ROOT)/gnuc.c 313 314 go.o: $C/go.c 315 $(CC) -c $(MFLAGS) $< 316 317 gother.o: $C/gother.c 318 $(CC) -c $(MFLAGS) $< 319 320 hdrgen.o: hdrgen.c 321 $(CC) -c $(CFLAGS) $< 322 323 html.o: $(CH) $(TOTALH) $C/html.h $C/html.c 324 $(CC) -c -I$(ROOT) $(MFLAGS) $C/html.c 325 326 iasm.o : $(CH) $(TOTALH) $C/iasm.h iasm.c 327 $(CC) -c $(MFLAGS) -I$(ROOT) iasm.c 328 329 identifier.o: identifier.c 330 $(CC) -c $(CFLAGS) $< 331 332 impcnvtab.o: mtype.h impcnvtab.c 333 $(CC) -c $(CFLAGS) -I$(ROOT) impcnvtab.c 334 335 import.o: import.c 336 $(CC) -c $(CFLAGS) $< 337 338 inifile.o: inifile.c 339 $(CC) -c $(CFLAGS) $< 340 341 init.o: init.c 342 $(CC) -c $(CFLAGS) $< 343 344 inline.o: inline.c 345 $(CC) -c $(CFLAGS) $< 346 347 interpret.o: interpret.c 348 $(CC) -c $(CFLAGS) $< 349 350 json.o: json.c 351 $(CC) -c $(CFLAGS) $< 352 353 lexer.o: lexer.c 354 $(CC) -c $(CFLAGS) $< 355 356 libelf.o: libelf.c $C/melf.h 357 $(CC) -c $(CFLAGS) -I$C $< 358 359 libmach.o: libmach.c $C/mach.h 360 $(CC) -c $(CFLAGS) -I$C $< 361 362 link.o: link.c 363 $(CC) -c $(CFLAGS) $< 364 365 lstring.o: $(ROOT)/lstring.c 366 $(CC) -c $(GFLAGS) -I$(ROOT) $< 367 368 machobj.o: $C/machobj.c 369 $(CC) -c $(MFLAGS) $< 370 371 macro.o: macro.c 372 $(CC) -c $(CFLAGS) $< 373 374 man.o: $(ROOT)/man.c 375 $(CC) -c $(GFLAGS) -I$(ROOT) $< 376 377 mangle.o: mangle.c 378 $(CC) -c $(CFLAGS) $< 379 380 mars.o: mars.c 381 $(CC) -c $(CFLAGS) $< 382 383 rmem.o: $(ROOT)/rmem.c 384 $(CC) -c $(GFLAGS) -I$(ROOT) $(ROOT)/rmem.c 385 386 module.o: $(TOTALH) $C/html.h module.c 387 $(CC) -c $(CFLAGS) -I$C module.c 388 389 msc.o: $(CH) mars.h msc.c 390 $(CC) -c $(MFLAGS) msc.c 391 392 mtype.o: mtype.c 393 $(CC) -c $(CFLAGS) $< 394 395 nteh.o: $C/rtlsym.h $C/nteh.c 396 $(CC) -c $(MFLAGS) $C/nteh.c 397 398 opover.o: opover.c 399 $(CC) -c $(CFLAGS) $< 400 401 optimize.o: optimize.c 402 $(CC) -c $(CFLAGS) $< 403 404 os.o: $C/os.c 405 $(CC) -c $(MFLAGS) $< 406 407 out.o: $C/out.c 408 $(CC) -c $(MFLAGS) $< 409 410 outbuf.o : $C/outbuf.h $C/outbuf.c 411 $(CC) -c $(MFLAGS) $C/outbuf.c 412 413 parse.o: parse.c 414 $(CC) -c $(CFLAGS) $< 415 416 ph.o: ph.c 417 $(CC) -c $(MFLAGS) $< 418 419 port.o: $(ROOT)/port.c 420 $(CC) -c $(GFLAGS) -I$(ROOT) $< 421 422 ptrntab.o: $C/iasm.h $C/ptrntab.c 423 $(CC) -c $(MFLAGS) $C/ptrntab.c 424 425 response.o: $(ROOT)/response.c 426 $(CC) -c $(GFLAGS) -I$(ROOT) $< 427 428 root.o: $(ROOT)/root.c 429 $(CC) -c $(GFLAGS) -I$(ROOT) $< 430 431 rtlsym.o: $C/rtlsym.h $C/rtlsym.c 432 $(CC) -c $(MFLAGS) $C/rtlsym.c 433 434 s2ir.o : $C/rtlsym.h statement.h s2ir.c 435 $(CC) -c -I$(ROOT) $(MFLAGS) s2ir.c 436 437 scope.o: scope.c 438 $(CC) -c $(CFLAGS) $< 439 440 statement.o: statement.c 441 $(CC) -c $(CFLAGS) $< 442 443 staticassert.o: staticassert.h staticassert.c 444 $(CC) -c $(CFLAGS) staticassert.c 445 446 stringtable.o: $(ROOT)/stringtable.c 447 $(CC) -c $(GFLAGS) -I$(ROOT) $< 448 449 strtold.o: $C/strtold.c 450 gcc -m32 -c $C/strtold.c 451 452 struct.o: struct.c 453 $(CC) -c $(CFLAGS) $< 454 455 template.o: template.c 456 $(CC) -c $(CFLAGS) $< 457 458 ti_achar.o: $C/tinfo.h $C/ti_achar.c 459 $(CC) -c $(MFLAGS) -I. $C/ti_achar.c 460 461 tk.o: tk.c 462 $(CC) -c $(MFLAGS) tk.c 463 464 tocsym.o: $(CH) $(TOTALH) mars.h module.h tocsym.c 465 $(CC) -c $(MFLAGS) -I$(ROOT) tocsym.c 466 467 toctype.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h toctype.c 468 $(CC) -c $(MFLAGS) -I$(ROOT) toctype.c 469 470 todt.o : mtype.h expression.h $C/dt.h todt.c 471 $(CC) -c -I$(ROOT) $(MFLAGS) todt.c 472 473 toelfdebug.o: $(CH) $(TOTALH) mars.h toelfdebug.c 474 $(CC) -c $(MFLAGS) -I$(ROOT) toelfdebug.c 475 476 toir.o: $C/rtlsym.h expression.h toir.h toir.c 477 $(CC) -c -I$(ROOT) $(MFLAGS) toir.c 478 479 toobj.o: $(CH) $(TOTALH) mars.h module.h toobj.c 480 $(CC) -c $(MFLAGS) -I$(ROOT) toobj.c 481 482 traits.o: $(TOTALH) traits.c 483 $(CC) -c $(CFLAGS) $< 484 485 type.o: $C/type.c 486 $(CC) -c $(MFLAGS) $C/type.c 487 488 typinf.o: $(CH) $(TOTALH) mars.h module.h mtype.h typinf.c 489 $(CC) -c $(MFLAGS) -I$(ROOT) typinf.c 490 491 util.o: util.c 492 $(CC) -c $(MFLAGS) $< 493 494 utf.o: utf.h utf.c 495 $(CC) -c $(CFLAGS) utf.c 496 497 unialpha.o: unialpha.c 498 $(CC) -c $(CFLAGS) $< 499 500 var.o: $C/var.c optab.c 501 $(CC) -c $(MFLAGS) -I. $C/var.c 502 503 version.o: version.c 504 $(CC) -c $(CFLAGS) $< 505 506 ###################################################### 507 508 gcov: 509 gcov access.c 510 gcov aliasthis.c 511 gcov arrayop.c 512 gcov attrib.c 513 gcov bit.c 514 gcov builtin.c 515 gcov cast.c 516 gcov class.c 517 gcov clone.c 518 gcov cond.c 519 gcov constfold.c 520 gcov declaration.c 521 gcov delegatize.c 522 gcov doc.c 523 gcov dsymbol.c 524 gcov dump.c 525 gcov e2ir.c 526 gcov eh.c 527 gcov entity.c 528 gcov enum.c 529 gcov expression.c 530 gcov func.c 531 gcov glue.c 532 gcov iasm.c 533 gcov identifier.c 534 gcov import.c 535 gcov inifile.c 536 gcov init.c 537 gcov inline.c 538 gcov interpret.c 539 gcov irstate.c 540 gcov json.c 541 gcov lexer.c 542 gcov libelf.c 543 gcov link.c 544 gcov macro.c 545 gcov mangle.c 546 gcov mars.c 547 gcov module.c 548 gcov msc.c 549 gcov mtype.c 550 gcov opover.c 551 gcov optimize.c 552 gcov parse.c 553 gcov ph.c 554 gcov scope.c 555 gcov statement.c 556 gcov staticassert.c 557 gcov s2ir.c 558 gcov struct.c 559 gcov template.c 560 gcov tk.c 561 gcov tocsym.c 562 gcov todt.c 563 gcov toobj.c 564 gcov toctype.c 565 gcov toelfdebug.c 566 gcov typinf.c 567 gcov unialpha.c 568 gcov utf.c 569 gcov util.c 570 gcov version.c 571 572 # gcov hdrgen.c 573 # gcov tocvdebug.c 574 575 ###################################################### 576 577 zip: 578 -rm -f dmdsrc.zip 579 zip dmdsrc $(SRC) -
dmd/src/dmd/lexer.c
diff -r cb833e4e6fba dmd/src/dmd/lexer.c
a b 2415 2415 #ifdef IN_GCC 2416 2416 t->float80value = real_t::parse((char *)stringbuffer.data, real_t::LongDouble); 2417 2417 #else 2418 #ifdef B_HAIKU_VERSION 2419 t->float80value = (real_t)strtod((char *)stringbuffer.data, NULL); 2420 #else 2418 2421 t->float80value = strtold((char *)stringbuffer.data, NULL); 2422 #endif 2419 2423 #endif 2420 2424 errno = 0; 2421 2425 switch (*p) -
dmd/src/dmd/mars.c
diff -r cb833e4e6fba dmd/src/dmd/mars.c
a b 14 14 #include <assert.h> 15 15 #include <limits.h> 16 16 17 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 17 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 18 18 #include <errno.h> 19 19 #endif 20 20 21 #if defined(B_HAIKU_VERSION) 22 #include <posix/errno.h> 23 #endif 24 21 25 #include "rmem.h" 22 26 #include "root.h" 23 27 #include "async.h" … … 356 360 357 361 #if _WIN32 358 362 inifile(argv[0], "sc.ini"); 359 #elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 363 #elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 360 364 inifile(argv[0], "dmd.conf"); 361 365 #else 362 366 #error "fix this" -
dmd/src/dmd/opover.c
diff -r cb833e4e6fba dmd/src/dmd/opover.c
a b 12 12 #include <stdlib.h> 13 13 #include <ctype.h> 14 14 #include <assert.h> 15 16 #ifdef B_HAIKU_VERSION 17 18 #include <complex> 19 20 #else 21 15 22 #if _MSC_VER 16 23 #include <complex> 17 24 #else 18 25 #include <complex.h> 19 26 #endif 20 27 28 #endif 29 21 30 #include "rmem.h" 22 31 23 32 //#include "port.h" -
dmd/src/dmd/root/port.c
diff -r cb833e4e6fba dmd/src/dmd/root/port.c
a b 13 13 #include <stdlib.h> 14 14 #include <string.h> 15 15 16 #ifdef B_HAIKU_VERSION 17 #include <posix/math.h> 18 #endif 19 20 16 21 double Port::nan = NAN; 17 22 double Port::infinity = INFINITY; 18 23 double Port::dbl_max = DBL_MAX; … … 315 320 316 321 #endif 317 322 318 #if linux || __APPLE__ || __FreeBSD__ 323 #if linux || __APPLE__ || __FreeBSD__ || defined(B_HAIKU_VERSION) 319 324 320 325 #include <math.h> 321 326 #if linux … … 369 374 #if __APPLE__ 370 375 return __inline_isnan(r); 371 376 #else 377 #ifdef B_HAIKU_VERSION 378 return __isnan(r); 379 #else 372 380 return ::isnan(r); 381 #endif 373 382 #endif 374 383 } 375 384 … … 378 387 #if __APPLE__ 379 388 return __inline_isnan(r); 380 389 #else 390 #ifdef B_HAIKU_VERSION 391 return __isnan(r); 392 #else 381 393 return ::isnan(r); 394 #endif 382 395 #endif 383 396 } 384 397 … … 410 423 #if __APPLE__ 411 424 return fpclassify(r) == FP_INFINITE; 412 425 #else 426 #ifndef B_HAIKU_VERSION 413 427 return ::isinf(r); 428 #else 429 return __isinf(r); 430 #endif 414 431 #endif 415 432 } 416 433 -
dmd/src/dmd/root/root.c
diff -r cb833e4e6fba dmd/src/dmd/root/root.c
a b 7 7 // in artistic.txt, or the GNU General Public License in gnu.txt. 8 8 // See the included readme.txt for details. 9 9 10 #define POSIX (linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 )10 #define POSIX (linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) ) 11 11 12 12 #include <stdio.h> 13 13 #include <stdlib.h> -
dmd/src/dmd/tk/filespec.c
diff -r cb833e4e6fba dmd/src/dmd/tk/filespec.c
a b 25 25 #include <ctype.h> 26 26 #endif 27 27 28 #if M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 28 #if M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 29 29 #include <stdlib.h> 30 30 #include <unistd.h> 31 31 #endif … … 87 87 /**********************/ 88 88 char * filespecrootpath(char *filespec) 89 89 { 90 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 90 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 91 91 #define DIRCHAR '/' 92 92 #endif 93 93 #if MSDOS || __OS2__ || __NT__ || _WIN32 … … 112 112 #endif 113 113 114 114 /* get current working directory path */ 115 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 115 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 116 116 cwd_t = (char *)getcwd(NULL, 256); 117 117 #endif 118 118 #if MSDOS || __OS2__ || __NT__ || _WIN32 … … 133 133 if (cwd[strlen(cwd) - 1] == DIRCHAR) 134 134 cwd[strlen(cwd) - 1] = '\0'; 135 135 #endif 136 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 136 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 137 137 free(cwd_t); 138 138 #endif 139 139 p = filespec; … … 150 150 { 151 151 cwd_t = cwd; 152 152 cwd = (char *)mem_calloc(strlen(cwd_t) + 1 + strlen(p) + 1); 153 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 153 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 154 154 sprintf(cwd, "%s/%s", cwd_t, p); /* add relative directory */ 155 155 #endif 156 156 #if MSDOS || __OS2__ || __NT__ || _WIN32 … … 171 171 { /* ... save remaining string */ 172 172 cwd_t = cwd; 173 173 cwd = (char *)mem_calloc(strlen(cwd_t) + 1 + strlen(p) + 1); 174 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 174 #if SUN || M_UNIX || M_XENIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 175 175 sprintf(cwd, "%s/%s", cwd_t, p); /* add relative directory */ 176 176 #endif 177 177 #if MSDOS || __OS2__ || __NT__ || _WIN32 … … 402 402 #if MSDOS || __OS2__ || __NT__ || _WIN32 403 403 return filespecforceext(filespec,"BAK"); 404 404 #endif 405 #if BSDUNIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 405 #if BSDUNIX || linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 406 406 char *p,*f; 407 407 408 408 /* Prepend .B to file name, if it isn't already there */ -
dmd/src/dmd/todt.c
diff -r cb833e4e6fba dmd/src/dmd/todt.c
a b 20 20 #include <string.h> 21 21 #include <time.h> 22 22 #include <assert.h> 23 #include <complex.h> 23 24 #ifdef B_HAIKU_VERSION 25 #include <complex> 26 #else 27 #include <complex.h> 28 #endif 24 29 25 30 #include "lexer.h" 26 31 #include "mtype.h" -
dmd/src/dmd/toir.c
diff -r cb833e4e6fba dmd/src/dmd/toir.c
a b 15 15 #include <stdio.h> 16 16 #include <string.h> 17 17 #include <time.h> 18 19 #ifdef B_HAIKU_VERSION 20 #include <complex> 21 #else 18 22 #include <complex.h> 23 #endif 19 24 20 25 #include "lexer.h" 21 26 #include "expression.h" -
dmd/src/dmd/traits.c
diff -r cb833e4e6fba dmd/src/dmd/traits.c
a b 12 12 #include <stdlib.h> 13 13 #include <ctype.h> 14 14 #include <assert.h> 15 #if _MSC_VER 15 #if _MSC_VER || defined(B_HAIKU_VERSION) 16 16 #include <complex> 17 17 #else 18 18 #include <complex.h> -
dmd/src/dmd/util.c
diff -r cb833e4e6fba dmd/src/dmd/util.c
a b 131 131 132 132 #endif 133 133 134 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 134 #if linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 || defined(B_HAIKU_VERSION) 135 135 void util_progress() 136 136 { 137 137 }
