Changeset d63eeb0 for src/libcfa
- Timestamp:
- Feb 9, 2016, 3:25:05 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7528ba1
- Parents:
- 771b3c3 (diff), bd85400 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/libcfa
- Files:
-
- 3 added
- 2 edited
- 18 moved
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/Makefile.am
r771b3c3 rd63eeb0 6 6 ## file "LICENCE" distributed with Cforall. 7 7 ## 8 ## Makefile.am -- 8 ## Makefile.am -- 9 9 ## 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Wed Dec 16 22:58:17 201514 ## Update Count : 913 ## Last Modified On : Wed Feb 3 11:19:35 2016 14 ## Update Count : 117 15 15 ############################################################################### 16 16 17 libcfa_a_SOURCES = libcfa-prelude.c18 17 lib_LIBRARIES = libcfa.a 19 18 … … 41 40 prototypes.awk : 42 41 43 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c 42 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 43 44 #-------------------------------------------------- 44 45 45 46 libcfa-prelude.c : ${srcdir}/prelude.cf 46 ../cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install47 ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 47 48 48 49 libcfa-prelude.o : libcfa-prelude.c 49 ${BACKEND_CC} -c -o $@ $< 50 @BACKEND_CC@ -c -o $@ $< 51 52 CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 53 CC = ${abs_top_srcdir}/src/driver/cfa 54 55 # extension-less header files are overridden by default make rules => explicitly override rule 56 % : %.c 57 true 58 59 .c.o : ${abs_top_srcdir}/src/driver/cfa-cpp 60 ${CC} ${CFLAGS} -c -o $@ $< 61 62 libs = # stdlib iostream fstream iterator # temporarily getting rid of these until ctor/dtor autogen works 63 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c} 64 65 cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math 66 cfaheaders = limits 67 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders} 68 69 MAINTAINERCLEANFILES += ${includedir}/* -
src/libcfa/Makefile.in
r771b3c3 rd63eeb0 18 18 ######################## -*- Mode: Makefile-Automake -*- ###################### 19 19 ############################################################################### 20 20 21 21 22 … … 38 39 POST_UNINSTALL = : 39 40 subdir = src/libcfa 40 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 41 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ 42 $(srcdir)/Makefile.in 41 43 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 42 44 am__aclocal_m4_deps = $(top_srcdir)/configure.ac … … 74 76 $(am__cd) "$$dir" && rm -f $$files; }; \ 75 77 } 76 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" 78 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" \ 79 "$(DESTDIR)$(includedir)" 77 80 LIBRARIES = $(lib_LIBRARIES) 78 81 AR = ar … … 80 83 libcfa_a_AR = $(AR) $(ARFLAGS) 81 84 libcfa_a_LIBADD = 82 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) 85 am__objects_1 = 86 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1) 83 87 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS) 84 88 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) … … 93 97 DIST_SOURCES = $(libcfa_a_SOURCES) 94 98 DATA = $(cfalib_DATA) 99 HEADERS = $(include_HEADERS) 95 100 ETAGS = etags 96 101 CTAGS = ctags … … 104 109 AWK = @AWK@ 105 110 BACKEND_CC = @BACKEND_CC@ 106 CC = @CC@111 CC = ${abs_top_srcdir}/src/driver/cfa 107 112 CCDEPMODE = @CCDEPMODE@ 108 113 CFA_BINDIR = @CFA_BINDIR@ … … 110 115 CFA_LIBDIR = @CFA_LIBDIR@ 111 116 CFA_PREFIX = @CFA_PREFIX@ 112 CFLAGS = @CFLAGS@117 CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 113 118 CPP = @CPP@ 114 119 CPPFLAGS = @CPPFLAGS@ … … 200 205 top_builddir = @top_builddir@ 201 206 top_srcdir = @top_srcdir@ 202 libcfa_a_SOURCES = libcfa-prelude.c203 207 lib_LIBRARIES = libcfa.a 204 208 … … 206 210 cfalibdir = ${libdir} 207 211 cfalib_DATA = prelude.cf builtins.cf 208 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c 212 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} \ 213 ${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/* 214 libs = # stdlib iostream fstream iterator # temporarily getting rid of these until ctor/dtor autogen works 215 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c} 216 cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math 217 cfaheaders = limits 218 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders} 209 219 all: all-am 210 220 … … 220 230 esac; \ 221 231 done; \ 222 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/libcfa/Makefile'; \232 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libcfa/Makefile'; \ 223 233 $(am__cd) $(top_srcdir) && \ 224 $(AUTOMAKE) -- foreignsrc/libcfa/Makefile234 $(AUTOMAKE) --gnu src/libcfa/Makefile 225 235 .PRECIOUS: Makefile 226 236 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 284 294 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa-prelude.Po@am__quote@ 285 295 286 .c.o:287 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<288 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po289 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@290 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@291 @am__fastdepCC_FALSE@ $(COMPILE) -c $<292 293 296 .c.obj: 294 297 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` … … 315 318 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 316 319 dir='$(DESTDIR)$(cfalibdir)'; $(am__uninstall_files_from_dir) 320 install-includeHEADERS: $(include_HEADERS) 321 @$(NORMAL_INSTALL) 322 test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" 323 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ 324 for p in $$list; do \ 325 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 326 echo "$$d$$p"; \ 327 done | $(am__base_list) | \ 328 while read files; do \ 329 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ 330 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ 331 done 332 333 uninstall-includeHEADERS: 334 @$(NORMAL_UNINSTALL) 335 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ 336 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 337 dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) 317 338 318 339 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) … … 400 421 check-am: all-am 401 422 check: check-am 402 all-am: Makefile $(LIBRARIES) $(DATA) 423 all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS) 403 424 installdirs: 404 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" ; do \425 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" "$(DESTDIR)$(includedir)"; do \ 405 426 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 406 427 done … … 458 479 info-am: 459 480 460 install-data-am: install-cfalibDATA 481 install-data-am: install-cfalibDATA install-includeHEADERS 461 482 462 483 install-dvi: install-dvi-am … … 503 524 ps-am: 504 525 505 uninstall-am: uninstall-cfalibDATA uninstall-libLIBRARIES 526 uninstall-am: uninstall-cfalibDATA uninstall-includeHEADERS \ 527 uninstall-libLIBRARIES 506 528 507 529 .MAKE: install-am install-strip … … 513 535 install-data install-data-am install-dvi install-dvi-am \ 514 536 install-exec install-exec-am install-html install-html-am \ 515 install-info install-info-am install-libLIBRARIES install-man \ 516 install-pdf install-pdf-am install-ps install-ps-am \ 517 install-strip installcheck installcheck-am installdirs \ 518 maintainer-clean maintainer-clean-generic mostlyclean \ 519 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 520 tags uninstall uninstall-am uninstall-cfalibDATA \ 537 install-includeHEADERS install-info install-info-am \ 538 install-libLIBRARIES install-man install-pdf install-pdf-am \ 539 install-ps install-ps-am install-strip installcheck \ 540 installcheck-am installdirs maintainer-clean \ 541 maintainer-clean-generic mostlyclean mostlyclean-compile \ 542 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ 543 uninstall-am uninstall-cfalibDATA uninstall-includeHEADERS \ 521 544 uninstall-libLIBRARIES 522 545 … … 541 564 prototypes.awk : 542 565 566 #-------------------------------------------------- 567 543 568 libcfa-prelude.c : ${srcdir}/prelude.cf 544 ../cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install569 ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 545 570 546 571 libcfa-prelude.o : libcfa-prelude.c 547 ${BACKEND_CC} -c -o $@ $< 572 @BACKEND_CC@ -c -o $@ $< 573 574 # extension-less header files are overridden by default make rules => explicitly override rule 575 % : %.c 576 true 577 578 .c.o : ${abs_top_srcdir}/src/driver/cfa-cpp 579 ${CC} ${CFLAGS} -c -o $@ $< 548 580 549 581 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/libcfa/fstream
r771b3c3 rd63eeb0 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // fstream .h--7 // fstream -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 27 18:13:08 201513 // Update Count : 112 // Last Modified On : Wed Jan 27 23:47:41 2016 13 // Update Count : 3 14 14 // 15 15 … … 17 17 #define __FSTREAM_H__ 18 18 19 #include "iostream .h"19 #include "iostream" 20 20 21 21 typedef struct ofstream ofstream; … … 44 44 45 45 // Local Variables: // 46 // mode: c // 46 47 // tab-width: 4 // 47 // compile-command: "cfa fstream.c" //48 48 // End: // -
src/libcfa/fstream.c
r771b3c3 rd63eeb0 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Nov 19 22:43:31 201513 // Update Count : 412 // Last Modified On : Tue Jan 26 17:12:59 2016 13 // Update Count : 6 14 14 // 15 15 16 #include "fstream .h"16 #include "fstream" 17 17 18 18 extern "C" { -
src/libcfa/iostream
r771b3c3 rd63eeb0 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // iostream .h--7 // iostream -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 4 09:02:11201613 // Update Count : 2 012 // Last Modified On : Fri Jan 29 15:50:36 2016 13 // Update Count : 29 14 14 // 15 15 … … 17 17 #define IOSTREAM_H 18 18 19 #include "iterator .h"19 #include "iterator" 20 20 21 21 typedef unsigned long streamsize_type; … … 39 39 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long int ); 40 40 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long long int ); 41 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float ); // FIX ME: should not be required 41 42 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double ); 42 43 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double ); 44 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float _Complex ); 45 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double _Complex ); 46 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double _Complex ); 43 47 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * ); 44 48 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * ); … … 80 84 81 85 // Local Variables: // 86 // mode: c // 82 87 // tab-width: 4 // 83 // compile-command: "cfa iostream.c" //84 88 // End: // -
src/libcfa/iostream.c
r771b3c3 rd63eeb0 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 4 09:38:58201613 // Update Count : 3712 // Last Modified On : Mon Feb 1 14:20:30 2016 13 // Update Count : 60 14 14 // 15 15 16 #include "iostream.h" 16 #include "iostream" 17 17 18 extern "C" { 18 19 #include <stdio.h> 19 20 #include <string.h> // strlen 21 #include <complex.h> // creal, cimag 20 22 } 21 23 … … 62 64 63 65 forall( dtype ostype | ostream( ostype ) ) 66 ostype * ?|?( ostype *os, float f ) { 67 char buffer[32]; 68 return write( os, buffer, sprintf( buffer, "%g", f ) ); 69 } // ?|? 70 71 forall( dtype ostype | ostream( ostype ) ) 64 72 ostype * ?|?( ostype *os, double d ) { 65 73 char buffer[32]; … … 71 79 char buffer[32]; 72 80 return write( os, buffer, sprintf( buffer, "%Lg", d ) ); 81 } // ?|? 82 83 forall( dtype ostype | ostream( ostype ) ) 84 ostype * ?|?( ostype *os, float _Complex c ) { 85 return os | crealf( c ) | (cimagf( c ) < 0 ? "" : "+") | cimagf( c ) | 'i'; 86 } // ?|? 87 88 forall( dtype ostype | ostream( ostype ) ) 89 ostype * ?|?( ostype *os, double _Complex c ) { 90 return os | creal( c ) | (cimag( c ) < 0 ? "" : "+") | cimag( c ) | 'i'; 91 } // ?|? 92 93 forall( dtype ostype | ostream( ostype ) ) 94 ostype * ?|?( ostype *os, long double _Complex c ) { 95 return os | creall( c ) | (cimagl( c ) < 0 ? "" : "+") | cimagl( c ) | 'i'; 73 96 } // ?|? 74 97 -
src/libcfa/iterator
r771b3c3 rd63eeb0 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // iterator .h--7 // iterator -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Nov 19 17:58:28 201513 // Update Count : 612 // Last Modified On : Wed Jan 27 23:49:13 2016 13 // Update Count : 7 14 14 // 15 15 … … 47 47 48 48 // Local Variables: // 49 // mode: c // 49 50 // tab-width: 4 // 50 // compile-command: "cfa iterator.c" //51 51 // End: // -
src/libcfa/iterator.c
r771b3c3 rd63eeb0 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Nov 19 17:54:37 201513 // Update Count : 2 412 // Last Modified On : Tue Jan 26 17:16:07 2016 13 // Update Count : 26 14 14 // 15 15 16 #include "iterator .h"16 #include "iterator" 17 17 18 18 forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
Note:
See TracChangeset
for help on using the changeset viewer.