Changeset c4c5d5d in examples-v2


Ignore:
Timestamp:
Aug 6, 2009, 11:42:04 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, examples-v2-4-10-branch, 286403d7a3d0e521179e677c0d2fd7549c9ceab4
Children:
ef97b18
Parents:
3a5391e
Message:

2009-08-06 Joel Sherrill <joel.sherrill@…>

  • cxx_throw/init.cc, libcpp/Makefile, libcpp/README, libcpp/foo.cc, libcpp/foo.h, libcpp/foo1.cpp: Now builds.
  • libcpp/.cvsignore: New file.
Location:
cxx
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • cxx/ChangeLog

    r3a5391e rc4c5d5d  
     12009-08-06      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * cxx_throw/init.cc, libcpp/Makefile, libcpp/README, libcpp/foo.cc,
     4        libcpp/foo.h, libcpp/foo1.cpp: Now builds.
     5        * libcpp/.cvsignore: New file.
     6
    172009-08-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • cxx/cxx_throw/init.cc

    r3a5391e rc4c5d5d  
    55 *  clock is required for the test, it should also be set to a known
    66 *  value by this function.
    7  *
    8  *  Input parameters:  NONE
    9  *
    10  *  Output parameters:  NONE
    117 *
    128 *  COPYRIGHT (c) 1994 by Division Incorporated
     
    2622#include <stdlib.h>
    2723#ifdef RTEMS_TEST_IO_STREAM
    28 #include <iostream.h>
     24  #include <iostream>
    2925#endif
    3026
    3127extern "C" {
    32 extern rtems_task main_task(rtems_task_argument);
     28  extern rtems_task main_task(rtems_task_argument);
    3329}
    3430
     
    115111
    116112#ifdef RTEMS_TEST_IO_STREAM
    117     cout << "Testing a C++ I/O stream" << endl;
     113    std::cout << "Testing a C++ I/O stream" << std::endl;
    118114#else
    119115    printf("IO Stream not tested\n");
     
    134130}
    135131
    136 //
    137 // main equivalent
    138 //      It can not be called 'main' since the bsp owns that name
    139 //      in many implementations in order to get global constructors
    140 //      run.
    141 //
    142132
     133
     134extern "C" {
     135  rtems_task Init(
     136    rtems_task_argument arg
     137  );
     138};
    143139
    144140rtems_task Init(
     
    159155#include <bsp.h>
    160156
    161 #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
     157#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
     158#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
    162159
    163160#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
  • cxx/libcpp/Makefile

    r3a5391e rc4c5d5d  
    1010
    1111# C and C++ source names, if any, go here -- minus the .c or .cc
    12 C_PIECES=
    13 C_FILES=$(C_PIECES:%=%.c)
    14 C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
     12C_FILES=
     13C_O_FILES=$(C_FILES:%.c=${ARCH}/%.o)
    1514
    16 CC_PIECES=foo
    17 CC_FILES=$(CC_PIECES:%=%.cc)
    18 CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
     15CC_FILES=foo.cc
     16CC_O_FILES=$(CC_FILES:%.cc=${ARCH}/%.o)
    1917
    20 CPP_PIECES=foo1
    21 CPP_FILES=$(CPP_PIECES:%=%.cpp)
    22 CPP_O_FILES=$(CPP_PIECES:%=${ARCH}/%.o)
     18CPP_FILES=foo1.cpp
     19CPP_O_FILES=$(CPP_FILES:%.cpp=${ARCH}/%.o)
    2320
    2421H_FILES=foo.h
    2522
    26 # Assembly source names, if any, go here -- minus the .s
    27 S_PIECES=
    28 S_FILES=$(S_PIECES:%=%.s)
    29 S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
    30 
    31 SRCS=$(C_FILES) $(CC_FILES) $(CPP_FILES) $(H_FILES) $(S_FILES)
    32 OBJS=$(C_O_FILES) $(CC_O_FILES) $(CPP_O_FILES) $(S_O_FILES)
     23SRCS=$(C_FILES) $(CC_FILES) $(CPP_FILES) $(H_FILES)
     24OBJS=$(C_O_FILES) $(CC_O_FILES) $(CPP_O_FILES)
    3325
    3426include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
    35 
    3627include $(RTEMS_CUSTOM)
    3728include $(PROJECT_ROOT)/make/lib.cfg
     
    6051#  'make clobber' already includes 'make clean'
    6152#
    62 
    6353CLEAN_ADDITIONS +=
    6454CLOBBER_ADDITIONS +=
  • cxx/libcpp/README

    r3a5391e rc4c5d5d  
     1#
     2# $Id$
     3#
     4
    15Example C++ library submitted by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
     6
     7The C++ is just place holders to illustrate the Makefile mechanics needed.
  • cxx/libcpp/foo.cc

    r3a5391e rc4c5d5d  
     1//
     2// $Id$
     3//
    14
    25#include "foo.h"
    36
    4 ostream& operator << ( ostream & strm, const foo &f)
     7std::ostream& operator << ( std::ostream & strm, const foo &f)
    58{
    6   strm << f.i ;
    7   return strm ;
     9  strm << f.i;
     10  return strm;
    811}
  • cxx/libcpp/foo.h

    r3a5391e rc4c5d5d  
     1//
     2// $Id$
     3//
     4
    15#ifndef _foo_h
    26#define _foo_h
     
    1115  foo( const int i0 ) : i(i0) {};
    1216
    13   friend ostream& operator << (ostream&,const foo&);
    14   friend ostream& operator << (ostream&,const foo&, const foo&);
     17  friend std::ostream& operator << (std::ostream&,const foo&);
     18  friend std::ostream& operator << (std::ostream&,const foo*);
    1519};
    1620
  • cxx/libcpp/foo1.cpp

    r3a5391e rc4c5d5d  
     1//
     2//  $Id$
     3//
    14
    25#include "foo.h"
    36
    4 ostream& operator << ( ostream & strm, const foo &f, const foo &f1 )
     7std::ostream& operator << ( std::ostream & strm, const foo *f )
    58{
    6   strm << f.i ;
    7   return strm ;
     9  strm << f->i;
     10  return strm;
    811}
Note: See TracChangeset for help on using the changeset viewer.