use namespace in lyxlib if available

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@424 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-01-17 22:42:04 +00:00
parent c36aa67f7b
commit 39fb0d0e42
3 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2000-01-17 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/kill.C: if we have namespace support we don't have
to include lyxlib.h.
* src/support/lyxlib.h: use namespace lyx if supported.
2000-01-14 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/date.C: new file

View File

@ -3,9 +3,18 @@
#include <sys/types.h>
#include <signal.h>
#ifdef CXX_WORKING_NAMESPACES
namespace lyx {
int kill(pid_t pid, int sig)
{
return ::kill(pid, sig);
}
}
#else
#include "lyxlib.h"
int lyx::kill(pid_t pid, int sig)
{
return ::kill(pid, sig);
}
#endif

View File

@ -19,6 +19,24 @@
// (an inlined member of some class)?
// This should have been a namespace
#ifdef CXX_WORKING_NAMESPACES
namespace lyx {
///
char * getcwd(char * buffer, size_t size);
///
int chdir(char const * name);
/// generates an checksum
unsigned long sum(char const * file);
/// returns a date string
char * date();
///
string getUserName();
///
int kill(int pid, int sig);
///
void abort();
}
#else
struct lyx {
///
static char * getcwd(char * buffer, size_t size);
@ -35,4 +53,5 @@ struct lyx {
///
static void abort();
};
#endif // CXX_WORKING_NAMESPACES
#endif