Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andysworkshop committed Jun 8, 2016
0 parents commit 0576f67
Show file tree
Hide file tree
Showing 78 changed files with 32,387 additions and 0 deletions.
40 changes: 40 additions & 0 deletions include/algorithm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/

#ifndef __SGI_STL_ALGORITHM
#define __SGI_STL_ALGORITHM

#include <stl_algobase.h>
#include <stl_construct.h>
#include <stl_uninitialized.h>
#include <stl_tempbuf.h>
#include <stl_algo.h>

#endif /* __SGI_STL_ALGORITHM */

// Local Variables:
// mode:C++
// End:
41 changes: 41 additions & 0 deletions include/avr_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* avr_config.h
* Contains values that you can change to customize the way that the library behaves
*
* Created on: 1 Jan 2011
* Author: Andy Brown
*/

#ifndef __C4BCBBDE_67BC_4bb4_A5E1_7745E49AF0B6
#define __C4BCBBDE_67BC_4bb4_A5E1_7745E49AF0B6

#include <stdlib.h>


namespace avrstl {

// default alloc-ahead for vectors. quoting from the SGI docs:
//
// "It is crucial that the amount of growth is proportional to the current capacity(),
// rather than a fixed constant: in the former case inserting a series of elements
// into a vector is a linear time operation, and in the latter case it is quadratic."
//
// If this advice pertains to you, then uncomment the first line and comment out the second.
// The default here in avr-land is to assume that memory is scarce.

// template<typename T> size_t AvrVectorAllocAhead(size_t oldSize_) { return 2*oldSize_; }
template<typename T> size_t AvrVectorAllocAhead(size_t oldSize_) { return 20+oldSize_; }
// template<> size_t AvrVectorAllocAhead<char>(size_t oldSize_) { return 20+oldSize_; } // sample specialization for char

// minimum buffer size allocated ahead by a deque

inline size_t AvrDequeBufferSize() { return 20; }

// alloc-ahead additional memory increment for strings. The default SGI implementation will add
// the old size, doubling memory each time. We don't have memory to burn, so add 20 types each time

template<typename T> size_t AvrStringAllocAheadIncrement(size_t oldSize_) { return 20; }
}


#endif
48 changes: 48 additions & 0 deletions include/basic_definitions
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright (C) 2004 Garrett A. Kajmowicz
This file is part of the uClibc++ Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __BASIC_DEFINITIONS
#define __BASIC_DEFINITIONS 1

#pragma GCC visibility push(default)

//The following is used to support GCC symbol visibility patch

#define _UCXXEXPORT __attribute__ ((visibility("default")))
#define _UCXXLOCAL __attribute__ ((visibility("hidden")))
#define __UCLIBCXX_NORETURN __attribute__ ((__noreturn__))
#define __UCLIBCXX_TLS


//Testing purposes
#define __STRING_MAX_UNITS 65535

namespace std{
typedef signed long int streamsize;
}

#pragma GCC visibility pop

#endif


#ifdef __DODEBUG__
#define UCLIBCXX_DEBUG 1
#else
#define UCLIBCXX_DEBUG 0

#endif
Loading

0 comments on commit 0576f67

Please sign in to comment.