Changeset d41280e for src/libcfa


Ignore:
Timestamp:
Feb 8, 2016, 10:07:42 AM (10 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
c44e622
Parents:
00ede9e (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.
Message:

Merge branch 'master' into gc_noraii

Location:
src/libcfa
Files:
3 added
2 edited
18 moved

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    r00ede9e rd41280e  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Wed Dec 16 22:58:17 2015
    14 ## Update Count     : 9
     13## Last Modified On : Wed Feb  3 11:19:35 2016
     14## Update Count     : 117
    1515###############################################################################
    1616
    17 libcfa_a_SOURCES = libcfa-prelude.c
    1817lib_LIBRARIES = libcfa.a
    1918
     
    4140prototypes.awk :
    4241
    43 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c
     42MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     43
     44#--------------------------------------------------
    4445
    4546libcfa-prelude.c : ${srcdir}/prelude.cf
    46         ../cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     47        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    4748
    4849libcfa-prelude.o : libcfa-prelude.c
    49         ${BACKEND_CC} -c -o $@ $<
     50        @BACKEND_CC@ -c -o $@ $<
     51
     52CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
     53CC = ${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
     62libs = stdlib iostream fstream iterator
     63libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
     64
     65cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
     66cfaheaders = limits
     67include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
     68
     69MAINTAINERCLEANFILES += ${includedir}/*
  • src/libcfa/Makefile.in

    r00ede9e rd41280e  
    1818######################## -*- Mode: Makefile-Automake -*- ######################
    1919###############################################################################
     20
    2021
    2122
     
    3839POST_UNINSTALL = :
    3940subdir = src/libcfa
    40 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     41DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
     42        $(srcdir)/Makefile.in
    4143ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4244am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    7476         $(am__cd) "$$dir" && rm -f $$files; }; \
    7577  }
    76 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)"
     78am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" \
     79        "$(DESTDIR)$(includedir)"
    7780LIBRARIES = $(lib_LIBRARIES)
    7881AR = ar
     
    8083libcfa_a_AR = $(AR) $(ARFLAGS)
    8184libcfa_a_LIBADD =
    82 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT)
     85am__objects_1 = stdlib.$(OBJEXT) iostream.$(OBJEXT) fstream.$(OBJEXT) \
     86        iterator.$(OBJEXT)
     87am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1)
    8388libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
    8489DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
     
    9398DIST_SOURCES = $(libcfa_a_SOURCES)
    9499DATA = $(cfalib_DATA)
     100HEADERS = $(include_HEADERS)
    95101ETAGS = etags
    96102CTAGS = ctags
     
    104110AWK = @AWK@
    105111BACKEND_CC = @BACKEND_CC@
    106 CC = @CC@
     112CC = ${abs_top_srcdir}/src/driver/cfa
    107113CCDEPMODE = @CCDEPMODE@
    108114CFA_BINDIR = @CFA_BINDIR@
     
    110116CFA_LIBDIR = @CFA_LIBDIR@
    111117CFA_PREFIX = @CFA_PREFIX@
    112 CFLAGS = @CFLAGS@
     118CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
    113119CPP = @CPP@
    114120CPPFLAGS = @CPPFLAGS@
     
    200206top_builddir = @top_builddir@
    201207top_srcdir = @top_srcdir@
    202 libcfa_a_SOURCES = libcfa-prelude.c
    203208lib_LIBRARIES = libcfa.a
    204209
     
    206211cfalibdir = ${libdir}
    207212cfalib_DATA = prelude.cf builtins.cf
    208 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c
     213MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} \
     214        ${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/*
     215libs = stdlib iostream fstream iterator
     216libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
     217cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
     218cfaheaders = limits
     219include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
    209220all: all-am
    210221
     
    220231          esac; \
    221232        done; \
    222         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libcfa/Makefile'; \
     233        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libcfa/Makefile'; \
    223234        $(am__cd) $(top_srcdir) && \
    224           $(AUTOMAKE) --foreign src/libcfa/Makefile
     235          $(AUTOMAKE) --gnu src/libcfa/Makefile
    225236.PRECIOUS: Makefile
    226237Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    282293        -rm -f *.tab.c
    283294
     295@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream.Po@am__quote@
     296@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iostream.Po@am__quote@
     297@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator.Po@am__quote@
    284298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa-prelude.Po@am__quote@
    285 
    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)/$*.Po
    289 @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 $<
     299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdlib.Po@am__quote@
    292300
    293301.c.obj:
     
    315323        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
    316324        dir='$(DESTDIR)$(cfalibdir)'; $(am__uninstall_files_from_dir)
     325install-includeHEADERS: $(include_HEADERS)
     326        @$(NORMAL_INSTALL)
     327        test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
     328        @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
     329        for p in $$list; do \
     330          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
     331          echo "$$d$$p"; \
     332        done | $(am__base_list) | \
     333        while read files; do \
     334          echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
     335          $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
     336        done
     337
     338uninstall-includeHEADERS:
     339        @$(NORMAL_UNINSTALL)
     340        @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
     341        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
     342        dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
    317343
    318344ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    400426check-am: all-am
    401427check: check-am
    402 all-am: Makefile $(LIBRARIES) $(DATA)
     428all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS)
    403429installdirs:
    404         for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)"; do \
     430        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" "$(DESTDIR)$(includedir)"; do \
    405431          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
    406432        done
     
    458484info-am:
    459485
    460 install-data-am: install-cfalibDATA
     486install-data-am: install-cfalibDATA install-includeHEADERS
    461487
    462488install-dvi: install-dvi-am
     
    503529ps-am:
    504530
    505 uninstall-am: uninstall-cfalibDATA uninstall-libLIBRARIES
     531uninstall-am: uninstall-cfalibDATA uninstall-includeHEADERS \
     532        uninstall-libLIBRARIES
    506533
    507534.MAKE: install-am install-strip
     
    513540        install-data install-data-am install-dvi install-dvi-am \
    514541        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 \
     542        install-includeHEADERS install-info install-info-am \
     543        install-libLIBRARIES install-man install-pdf install-pdf-am \
     544        install-ps install-ps-am install-strip installcheck \
     545        installcheck-am installdirs maintainer-clean \
     546        maintainer-clean-generic mostlyclean mostlyclean-compile \
     547        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
     548        uninstall-am uninstall-cfalibDATA uninstall-includeHEADERS \
    521549        uninstall-libLIBRARIES
    522550
     
    541569prototypes.awk :
    542570
     571#--------------------------------------------------
     572
    543573libcfa-prelude.c : ${srcdir}/prelude.cf
    544         ../cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     574        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    545575
    546576libcfa-prelude.o : libcfa-prelude.c
    547         ${BACKEND_CC} -c -o $@ $<
     577        @BACKEND_CC@ -c -o $@ $<
     578
     579# extension-less header files are overridden by default make rules => explicitly override rule
     580% : %.c
     581        true
     582
     583.c.o : ${abs_top_srcdir}/src/driver/cfa-cpp
     584        ${CC} ${CFLAGS} -c -o $@ $<
    548585
    549586# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/libcfa/fstream

    r00ede9e rd41280e  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // fstream.h --
     7// fstream --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 27 18:13:08 2015
    13 // Update Count     : 1
     12// Last Modified On : Wed Jan 27 23:47:41 2016
     13// Update Count     : 3
    1414//
    1515
     
    1717#define __FSTREAM_H__
    1818
    19 #include "iostream.h"
     19#include "iostream"
    2020
    2121typedef struct ofstream ofstream;
     
    4444
    4545// Local Variables: //
     46// mode: c //
    4647// tab-width: 4 //
    47 // compile-command: "cfa fstream.c" //
    4848// End: //
  • src/libcfa/fstream.c

    r00ede9e rd41280e  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 22:43:31 2015
    13 // Update Count     : 4
     12// Last Modified On : Tue Jan 26 17:12:59 2016
     13// Update Count     : 6
    1414//
    1515
    16 #include "fstream.h"
     16#include "fstream"
    1717
    1818extern "C" {
  • src/libcfa/iostream

    r00ede9e rd41280e  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iostream.h --
     7// iostream --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  4 09:02:11 2016
    13 // Update Count     : 20
     12// Last Modified On : Fri Jan 29 15:50:36 2016
     13// Update Count     : 29
    1414//
    1515
     
    1717#define IOSTREAM_H
    1818
    19 #include "iterator.h"
     19#include "iterator"
    2020
    2121typedef unsigned long streamsize_type;
     
    3939forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long int );
    4040forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long long int );
     41forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float ); // FIX ME: should not be required
    4142forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double );
    4243forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double );
     44forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float _Complex );
     45forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double _Complex );
     46forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double _Complex );
    4347forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * );
    4448forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * );
     
    8084
    8185// Local Variables: //
     86// mode: c //
    8287// tab-width: 4 //
    83 // compile-command: "cfa iostream.c" //
    8488// End: //
  • src/libcfa/iostream.c

    r00ede9e rd41280e  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  4 09:38:58 2016
    13 // Update Count     : 37
     12// Last Modified On : Mon Feb  1 14:20:30 2016
     13// Update Count     : 60
    1414//
    1515
    16 #include "iostream.h"
     16#include "iostream"
     17
    1718extern "C" {
    1819#include <stdio.h>
    1920#include <string.h>                                                                             // strlen
     21#include <complex.h>                                                                    // creal, cimag
    2022}
    2123
     
    6264
    6365forall( dtype ostype | ostream( ostype ) )
     66ostype * ?|?( ostype *os, float f ) {
     67        char buffer[32];
     68        return write( os, buffer, sprintf( buffer, "%g", f ) );
     69} // ?|?
     70
     71forall( dtype ostype | ostream( ostype ) )
    6472ostype * ?|?( ostype *os, double d ) {
    6573        char buffer[32];
     
    7179        char buffer[32];
    7280        return write( os, buffer, sprintf( buffer, "%Lg", d ) );
     81} // ?|?
     82
     83forall( dtype ostype | ostream( ostype ) )
     84ostype * ?|?( ostype *os, float _Complex c ) {
     85        return os | crealf( c ) | (cimagf( c ) < 0 ? "" : "+") | cimagf( c ) | 'i';
     86} // ?|?
     87
     88forall( dtype ostype | ostream( ostype ) )
     89ostype * ?|?( ostype *os, double _Complex c ) {
     90        return os | creal( c ) | (cimag( c ) < 0 ? "" : "+") | cimag( c ) | 'i';
     91} // ?|?
     92
     93forall( dtype ostype | ostream( ostype ) )
     94ostype * ?|?( ostype *os, long double _Complex c ) {
     95        return os | creall( c ) | (cimagl( c ) < 0 ? "" : "+") | cimagl( c ) | 'i';
    7396} // ?|?
    7497
  • src/libcfa/iterator

    r00ede9e rd41280e  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iterator.h --
     7// iterator --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:58:28 2015
    13 // Update Count     : 6
     12// Last Modified On : Wed Jan 27 23:49:13 2016
     13// Update Count     : 7
    1414//
    1515
     
    4747
    4848// Local Variables: //
     49// mode: c //
    4950// tab-width: 4 //
    50 // compile-command: "cfa iterator.c" //
    5151// End: //
  • src/libcfa/iterator.c

    r00ede9e rd41280e  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:54:37 2015
    13 // Update Count     : 24
     12// Last Modified On : Tue Jan 26 17:16:07 2016
     13// Update Count     : 26
    1414//
    1515
    16 #include "iterator.h"
     16#include "iterator"
    1717
    1818forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
Note: See TracChangeset for help on using the changeset viewer.