Commit 74da183a by Benjamin Kosnik

configure.in: Change GLIBCPP_ENABLE_SHADOW to GLIBCPP_ENABLE_CHEADERS.


2000-12-21  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in: Change GLIBCPP_ENABLE_SHADOW to
	GLIBCPP_ENABLE_CHEADERS.
	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to
	ENABLE_CHEADERS.  C_INCLUDE_DIR defaults to c_std from c.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* include/c: Move to ...
	* include/c_std: ...here.
	* include/c_std: Move to ...
	* include/c_shadow: ...here.
	* include/c: Repopulate, with simple headers.
	* docs/html/configopts.html: Adjust docs.

From-SVN: r38439
parent fb9affe7
// -*- C++ -*- C math library.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
// This file was written by Gabriel Dos Reis <gdr@codesourcery.com>
#ifndef _CPP_BITS_CMATH_TCC
#define _CPP_BITS_CMATH_TCC 1
namespace std {
export template<typename _Tp>
_Tp
__cmath_power(_Tp __x, unsigned int __n)
{
_Tp __y = __n % 2 ? __x : 1;
while (__n >>= 1)
{
__x = __x * __x;
if (__n % 2)
__y = __y * __x;
}
return __y;
}
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -37,13 +37,3 @@
#pragma GCC system_header
#include <assert.h>
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -36,55 +36,7 @@
#ifndef _CPP_CCTYPE
#define _CPP_CCTYPE 1
#include <bits/c++config.h>
#pragma GCC system_header
#include <ctype.h>
// Get rid of those macros defined in <ctype.h> in lieu of real functions.
#undef isalnum
#undef isalpha
#undef isblank
#undef iscntrl
#undef isdigit
#undef isgraph
#undef islower
#undef isprint
#undef ispunct
#undef isspace
#undef isupper
#undef isxdigit
#undef tolower
#undef toupper
namespace std
{
extern "C" int isalnum(int __c);
extern "C" int isalpha(int __c);
extern "C" int isblank(int __c);
extern "C" int iscntrl(int __c);
extern "C" int isdigit(int __c);
extern "C" int isgraph(int __c);
extern "C" int islower(int __c);
extern "C" int isprint(int __c);
extern "C" int ispunct(int __c);
extern "C" int isspace(int __c);
extern "C" int isupper(int __c);
extern "C" int isxdigit(int __c);
extern "C" int tolower(int __c);
extern "C" int toupper(int __c);
}
#endif
// The -*- C++ -*- error number header.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,13 +39,4 @@
#pragma GCC system_header
#include <errno.h>
namespace std
{
extern "C" int errno;
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -40,4 +40,3 @@
#include <float.h>
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -40,8 +40,3 @@
#include <limits.h>
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,14 +39,4 @@
#pragma GCC system_header
#include <locale.h>
namespace std
{
using ::lconv;
extern "C" char* setlocale(int, const char*);
extern "C" struct lconv* localeconv(void);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,10 +39,4 @@
#pragma GCC system_header
#include <setjmp.h>
namespace std
{
using ::jmp_buf;
extern "C" void longjmp(jmp_buf, int);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,11 +39,4 @@
#pragma GCC system_header
#include <signal.h>
namespace std
{
using ::sig_atomic_t;
extern "C" void (*signal(int, void (*__func)(int)))(int);
extern "C" int raise(int);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,9 +39,4 @@
#pragma GCC system_header
#include <stdarg.h>
namespace std
{
using ::va_list;
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,10 +39,4 @@
#pragma GCC system_header
#include <stddef.h>
namespace std
{
using ::ptrdiff_t;
using ::size_t;
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -36,80 +36,7 @@
#ifndef _CPP_CSTDIO
#define _CPP_CSTDIO 1
#include <bits/std_cstdarg.h>
#pragma GCC system_header
#include <stdio.h>
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
#undef clearerr
#undef feof
#undef ferror
#undef fileno
#undef getc
#undef getchar
#undef putc
#undef putchar
namespace std
{
using ::FILE;
using ::fpos_t;
extern "C" int remove(const char*);
extern "C" int rename(const char*, const char*);
extern "C" FILE* tmpfile(void);
extern "C" char* tmpnam(char*);
extern "C" int fclose(FILE*);
extern "C" int fflush(FILE*);
extern "C" FILE* fopen(const char*, const char*);
extern "C" FILE* freopen(const char*, const char*, FILE*);
extern "C" void setbuf(FILE*, char*);
extern "C" int setvbuf(FILE*, char*, int, size_t);
extern "C" int fprintf(FILE*, const char*, ...);
extern "C" int fscanf(FILE*, const char*, ...);
extern "C" int printf(const char*, ...);
extern "C" int scanf(const char*, ...);
extern "C" int snprintf(char *, size_t, const char*, ...);
extern "C" int sprintf(char *, const char*, ...);
extern "C" int sscanf(const char*, const char*, ...);
extern "C" int vfprintf(FILE*, const char*, va_list);
extern "C" int vfscanf(FILE*, const char*, va_list);
extern "C" int vprintf(const char*, va_list);
extern "C" int vscanf(const char*, va_list);
extern "C" int vsnprintf(char*, size_t, const char*, va_list);
extern "C" int vsprintf(char*, const char*, va_list);
extern "C" int vsscanf(const char*, const char*, va_list);
extern "C" int fgetc(FILE *);
extern "C" char *fgets(char*, int, FILE*);
extern "C" int fputc(int, FILE*);
extern "C" int fputs(const char*, FILE*);
extern "C" int getc(FILE*);
extern "C" int getchar(void);
extern "C" char *gets(char*);
extern "C" int putc(int, FILE*);
extern "C" int putchar(int);
extern "C" int puts(const char*);
extern "C" int ungetc(int, FILE*);
extern "C" size_t fread(void*, size_t, size_t, FILE*);
extern "C" size_t fwrite(const void*, size_t, size_t, FILE*);
extern "C" int fgetpos(FILE*, fpos_t*);
extern "C" int fseek(FILE*, long int, int);
extern "C" int fsetpos(FILE*, const fpos_t*);
extern "C" long int ftell(FILE*);
extern "C" void rewind(FILE*);
extern "C" void clearerr(FILE*);
extern "C" int feof(FILE*);
extern "C" int ferror(FILE*);
extern "C" void perror(const char*);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -36,91 +36,7 @@
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
#include <bits/c++config.h>
#pragma GCC system_header
#include <stdlib.h>
namespace std
{
using ::div_t;
using ::ldiv_t;
#ifdef _GLIBCPP_USE_LONG_LONG
# ifdef _GLIBCPP_HAVE_LLDIV_T
using ::lldiv_t;
# else
struct lldiv_t
{
long long quot;
long long rem;
};
# endif
#endif
extern "C" double atof(const char*);
extern "C" int atoi(const char*);
extern "C" long int atol(const char*);
extern "C" double strtod(const char*, char**);
extern "C" float strtof(const char*, char**);
extern "C" long int strtol(const char*, char**, int);
extern "C" unsigned long int strtoul(const char*, char**, int);
extern "C" int rand(void);
extern "C" void srand(unsigned int);
extern "C" void* calloc(size_t, size_t);
extern "C" void free(void*);
extern "C" void* malloc(size_t);
extern "C" void* realloc(void*, size_t);
extern "C" void abort(void);
extern "C" int atexit(void (*func)(void));
extern "C" void exit(int);
extern "C" void _Exit(int);
extern "C" char*getenv(const char*);
extern "C" int system(const char*);
extern "C" void* bsearch(const void*, const void*, size_t, size_t,
int (*comp)(const void *, const void *));
extern "C" void qsort(void*, size_t, size_t,
int (*comp)(const void *, const void *));
extern "C" int abs(int);
extern "C" long int labs(long int);
extern "C" div_t div(int, int);
extern "C" ldiv_t ldiv(long int, long int);
extern "C" int mblen(const char*, size_t);
extern "C" int mbtowc(wchar_t*, const char*, size_t);
extern "C" int wctomb(char*, wchar_t);
extern "C" size_t mbstowcs(wchar_t*, const char*, size_t);
extern "C" size_t wcstombs(char*, const wchar_t*, size_t);
#ifdef _GLIBCPP_USE_LONG_LONG
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
extern "C" long long int atoll(const char*);
extern "C" long long int strtoll(const char*, char**, int);
extern "C" unsigned long long int strtoull(const char*, char**, int);
#endif
#ifdef _GLIBCPP_HAVE_STRTOLD
extern "C" long double strtold(const char*, char**);
#endif
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -36,38 +36,7 @@
#ifndef _CPP_CSTRING
#define _CPP_CSTRING 1
#include <bits/c++config.h>
#pragma GCC system_header
#include <string.h>
namespace std
{
extern "C" void* memcpy(void*, const void*, size_t);
extern "C" void* memmove(void*, const void*, size_t);
extern "C" char* strcpy(char*, const char*);
extern "C" char* strncpy(char*, const char*, size_t);
extern "C" char* strcat(char*, const char*);
extern "C" char* strncat(char*, const char*, size_t);
extern "C" int memcmp(const void*, const void*, size_t);
extern "C" int strcmp(const char*, const char*);
extern "C" int strcoll(const char*, const char*);
extern "C" int strncmp(const char*, const char*, size_t);
extern "C" size_t strxfrm(char*, const char*, size_t);
extern "C" void* memchr(const void*, int, size_t);
extern "C" char* strchr(const char*, int);
extern "C" size_t strcspn(const char*, const char*);
extern "C" char* strpbrk(const char*, const char*);
extern "C" char* strrchr(const char*, int);
extern "C" size_t strspn(const char*, const char*);
extern "C" char* strstr(const char*, const char*);
extern "C" char* strtok(char*, const char*);
extern "C" void* memset(void*, int, size_t);
extern "C" char* strerror(int);
extern "C" size_t strlen(const char*);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,21 +39,4 @@
#pragma GCC system_header
#include <time.h>
namespace std
{
using ::clock_t;
using ::time_t;
using ::tm;
extern "C" clock_t clock(void);
extern "C" double difftime(time_t, time_t);
extern "C" time_t mktime(struct tm*);
extern "C" time_t time(time_t*);
extern "C" char* asctime(const struct tm*);
extern "C" char* ctime(const time_t*);
extern "C" struct tm* gmtime(const time_t*);
extern "C" struct tm* localtime(const time_t*);
extern "C" size_t strftime(char*, size_t, const char*, const struct tm*);
}
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -36,122 +36,7 @@
#ifndef _CPP_CWCHAR
#define _CPP_CWCHAR 1
#include <bits/c++config.h>
#include <bits/std_cstdio.h>
#include <bits/std_cstdarg.h>
#if _GLIBCPP_USE_WCHAR_T
#pragma GCC system_header
#include <wchar.h>
// Get rid of those macros defined in <wchar.h> in lieu of real functions.
#undef getwchar
namespace std
{
using ::wint_t;
using ::mbstate_t;
extern "C" wint_t btowc(int);
extern "C" int wctob(wint_t);
extern "C" wint_t fgetwc(FILE*);
extern "C" wchar_t* fgetws(wchar_t*, int, FILE*);
extern "C" wint_t fputwc(wchar_t, FILE*);
extern "C" int fputws(const wchar_t*, FILE*);
extern "C" int fwide(FILE*, int);
extern "C" int fwprintf(FILE*, const wchar_t*, ...);
extern "C" int fwscanf(FILE*, const wchar_t*, ...);
extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...);
extern "C" int swscanf(const wchar_t*, const wchar_t*, ...);
extern "C" int vfwprintf(FILE*, const wchar_t*, va_list);
extern "C" int vfwscanf(FILE*, const wchar_t*, va_list);
extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list);
extern "C" int vwprintf(const wchar_t*, va_list);
extern "C" int vwscanf(const wchar_t*, va_list);
extern "C" int wprintf(const wchar_t*, ...);
extern "C" int wscanf(const wchar_t*, ...);
extern "C" wint_t getwc(FILE* stream);
extern "C" wint_t getwchar(void);
extern "C" int mbsinit(const mbstate_t*);
extern "C" size_t mbrlen(const char*, size_t, mbstate_t*);
extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*);
extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*);
extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*);
extern "C" wint_t putwc(wchar_t, FILE*);
extern "C" wint_t putwchar(wchar_t);
extern "C" wint_t ungetwc(wint_t, FILE*);
extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*);
extern "C" double wcstod(const wchar_t*, wchar_t**);
extern "C" float wcstof(const wchar_t*, wchar_t**);
extern "C" long int wcstol(const wchar_t*, wchar_t**, int);
extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int);
extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*);
extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*);
extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t);
extern "C" int wcscmp(const wchar_t*, const wchar_t*);
extern "C" int wcscoll(const wchar_t*, const wchar_t*);
extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t);
extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
extern "C" wchar_t* wcschr(const wchar_t*, wchar_t);
extern "C" size_t wcscspn(const wchar_t*, const wchar_t*);
extern "C" size_t wcslen(const wchar_t*);
extern "C" wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
extern "C" wchar_t* wcsrchr(const wchar_t*, wchar_t);
extern "C" size_t wcsspn(const wchar_t*, const wchar_t*);
extern "C" wchar_t* wcsstr(const wchar_t*, const wchar_t*);
extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
extern "C" wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t);
//extern "C" int wmemcmp(wchar_t*, const wchar_t*, size_t);
extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t);
extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t);
extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
#if 0
// Full C99 listing
extern "C" long double wcstold(const wchar_t*, wchar_t**);
extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int);
extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int);
#endif
}
#else
extern "C"
{
typedef struct
{
int __fill[6];
} mbstate_t;
}
namespace std
{
using ::mbstate_t;
}
#endif //_GLIBCPP_USE_WCHAR_T
#endif
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,56 +39,4 @@
#pragma GCC system_header
#include <wctype.h>
// Get rid of those macros defined in <wctype.h> in lieu of real functions.
#undef iswalnum
#undef iswalpha
#undef iswblank
#undef iswcntrl
#undef iswdigit
#undef iswgraph
#undef iswlower
#undef iswprint
#undef iswprint
#undef iswpunct
#undef iswspace
#undef iswupper
#undef iswxdigit
#undef iswctype
#undef towlower
#undef towupper
#undef towctrans
#undef wctrans
namespace std
{
using ::wctype_t;
using ::wctrans_t;
extern "C" int iswalnum(wint_t);
extern "C" int iswalpha(wint_t);
extern "C" int iswblank(wint_t);
extern "C" int iswcntrl(wint_t);
extern "C" int iswdigit(wint_t);
extern "C" int iswgraph(wint_t);
extern "C" int iswlower(wint_t);
extern "C" int iswprint(wint_t);
extern "C" int iswpunct(wint_t);
extern "C" int iswspace(wint_t);
extern "C" int iswupper(wint_t);
extern "C" int iswxdigit(wint_t);
extern "C" int iswctype(wint_t, wctype_t);
extern "C" wctype_t wctype(const char *);
extern "C" wint_t towlower(wint_t);
extern "C" wint_t towupper(wint_t);
extern "C" wint_t towctrans(wint_t, wctrans_t);
extern "C" wctrans_t wctrans(const char*);
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment