mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Re-add cname header files, with additional <clocale>
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@208 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6d164fa2bf
commit
d2a80e12f2
7
src/cheaders/cctype
Normal file
7
src/cheaders/cctype
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- character type header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CCTYPE__
|
||||
#define __CCTYPE__
|
||||
#include <ctype.h>
|
||||
#endif
|
7
src/cheaders/cerrno
Normal file
7
src/cheaders/cerrno
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- error number header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CERRNO__
|
||||
#define __CERRNO__
|
||||
#include <errno.h>
|
||||
#endif
|
7
src/cheaders/clocale
Normal file
7
src/cheaders/clocale
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- locale support header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CLOCALE__
|
||||
#define __CLOCALE__
|
||||
#include <locale.h>
|
||||
#endif
|
80
src/cheaders/cmath
Normal file
80
src/cheaders/cmath
Normal file
@ -0,0 +1,80 @@
|
||||
// The -*- C++ -*- math functions header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CMATH__
|
||||
#define __CMATH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#include <_G_config.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cmath"
|
||||
#endif
|
||||
|
||||
extern "C++" {
|
||||
#if 0
|
||||
float acos (float);
|
||||
float asin (float);
|
||||
float atan (float);
|
||||
float atan2(float, float);
|
||||
float ceil (float);
|
||||
float cos (float);
|
||||
float cosh (float);
|
||||
float exp (float);
|
||||
float fabs (float);
|
||||
float floor(float);
|
||||
float fmod (float, float);
|
||||
float frexp(float, int*);
|
||||
float modf (float, float*);
|
||||
float ldexp(float, int);
|
||||
float log (float);
|
||||
float log10(float);
|
||||
float pow (float, float);
|
||||
float pow (float, int);
|
||||
float sin (float);
|
||||
float sinh (float);
|
||||
float sqrt (float);
|
||||
float tan (float);
|
||||
float tanh (float);
|
||||
#endif
|
||||
|
||||
inline float abs (float x) { return fabs (x); }
|
||||
#if ! _G_MATH_H_INLINES /* hpux and SCO define this in math.h */
|
||||
inline double abs (double x) { return fabs (x); }
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
double pow(double, int);
|
||||
|
||||
long double acos (long double);
|
||||
long double asin (long double);
|
||||
long double atan (long double);
|
||||
long double atan2(long double, long double);
|
||||
long double ceil (long double);
|
||||
long double cos (long double);
|
||||
long double cosh (long double);
|
||||
long double exp (long double);
|
||||
long double fabs (long double);
|
||||
long double floor(long double);
|
||||
long double frexp(long double, int*);
|
||||
long double fmod (long double, long double);
|
||||
long double frexp(long double, int*);
|
||||
long double log (long double);
|
||||
long double log10(long double);
|
||||
long double modf (long double, long double*);
|
||||
long double pow (long double, long double);
|
||||
long double pow (long double, int);
|
||||
long double sin (long double);
|
||||
long double sinh (long double);
|
||||
long double sqrt (long double);
|
||||
long double tan (long double);
|
||||
long double tanh (long double);
|
||||
#endif
|
||||
inline long double abs (long double x) { return fabs (x); }
|
||||
|
||||
} // extern "C++"
|
||||
|
||||
#endif
|
7
src/cheaders/csignal
Normal file
7
src/cheaders/csignal
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- signal handling header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CSIGNAL__
|
||||
#define __CSIGNAL__
|
||||
#include <signal.h>
|
||||
#endif
|
7
src/cheaders/cstdio
Normal file
7
src/cheaders/cstdio
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- standard I/O header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CSTDIO__
|
||||
#define __CSTDIO__
|
||||
#include <stdio.h>
|
||||
#endif
|
23
src/cheaders/cstdlib
Normal file
23
src/cheaders/cstdlib
Normal file
@ -0,0 +1,23 @@
|
||||
// The -*- C++ -*- standard library header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CSTDLIB__
|
||||
#define __CSTDLIB__
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cstdlib"
|
||||
#endif
|
||||
|
||||
extern "C++" {
|
||||
|
||||
#if _G_HAS_LABS
|
||||
inline long abs(long x) { return labs (x); }
|
||||
#else
|
||||
inline long abs(long x) { return x >= 0 ? x : -x; }
|
||||
#endif
|
||||
//inline ldiv_t div(long x, long y) { return ldiv (x, y); }
|
||||
|
||||
} // extern "C++"
|
||||
|
||||
#endif
|
96
src/cheaders/cstring
Normal file
96
src/cheaders/cstring
Normal file
@ -0,0 +1,96 @@
|
||||
// The -*- C++ -*- null-terminated string header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CSTRING__
|
||||
#define __CSTRING__
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if 0 // Let's not bother with this just yet.
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cstring"
|
||||
#endif
|
||||
|
||||
// The ANSI C prototypes for these functions have a const argument type and
|
||||
// non-const return type, so we can't use them.
|
||||
|
||||
extern "C++" {
|
||||
extern inline const char *
|
||||
_G_strchr (const char *s, int c)
|
||||
{
|
||||
return strchr (s, c);
|
||||
}
|
||||
|
||||
extern inline char *
|
||||
_G_strchr (char *s, int c)
|
||||
{
|
||||
return const_cast<char *> (strchr (s, c));
|
||||
}
|
||||
|
||||
extern inline const char *
|
||||
_G_strpbrk (const char *s1, const char *s2)
|
||||
{
|
||||
return strpbrk (s1, s2);
|
||||
}
|
||||
|
||||
extern inline char *
|
||||
_G_strpbrk (char *s1, const char *s2)
|
||||
{
|
||||
return const_cast<char *> (strpbrk (s1, s2));
|
||||
}
|
||||
|
||||
extern inline const char *
|
||||
_G_strrchr (const char *s, int c)
|
||||
{
|
||||
return strrchr (s, c);
|
||||
}
|
||||
|
||||
extern inline char *
|
||||
_G_strrchr (char *s, int c)
|
||||
{
|
||||
return const_cast<char *> (strrchr (s, c));
|
||||
}
|
||||
|
||||
extern inline const char *
|
||||
_G_strstr (const char *s1, const char *s2)
|
||||
{
|
||||
return strstr (s1, s2);
|
||||
}
|
||||
|
||||
extern inline char *
|
||||
_G_strstr (char *s1, const char *s2)
|
||||
{
|
||||
return const_cast<char *> (strstr (s1, s2));
|
||||
}
|
||||
|
||||
extern inline const void *
|
||||
_G_memchr (const void *s, int c, size_t n)
|
||||
{
|
||||
return memchr (s, c, n);
|
||||
}
|
||||
|
||||
extern inline void *
|
||||
_G_memchr (void *s, int c, size_t n)
|
||||
{
|
||||
return const_cast<void *> (memchr (s, c, n));
|
||||
}
|
||||
} // extern "C++"
|
||||
|
||||
// Lose any vendor macros for these functions.
|
||||
#undef strchr
|
||||
#undef strpbrk
|
||||
#undef strrchr
|
||||
#undef strstr
|
||||
#undef memchr
|
||||
|
||||
// Ewww, namespace pollution. Anyone have a better idea?
|
||||
#define strchr _G_strchr
|
||||
#define strpbrk _G_strpbrk
|
||||
#define strrchr _G_strrchr
|
||||
#define strstr _G_strstr
|
||||
#define memchr _G_memchr
|
||||
#endif // 0
|
||||
|
||||
#endif // !defined (__CSTRING__)
|
7
src/cheaders/ctime
Normal file
7
src/cheaders/ctime
Normal file
@ -0,0 +1,7 @@
|
||||
// The -*- C++ -*- time header.
|
||||
// This file is part of the GNU ANSI C++ Library.
|
||||
|
||||
#ifndef __CTIME__
|
||||
#define __CTIME__
|
||||
#include <time.h>
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user