From 39fb0d0e420349cc4d4e78da53f6fabbd00e7fe4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 17 Jan 2000 22:42:04 +0000 Subject: [PATCH] use namespace in lyxlib if available git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@424 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 7 +++++++ src/support/kill.C | 9 +++++++++ src/support/lyxlib.h | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 54d2887f83..e83e229bd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-01-17 Lars Gullik Bjønnes + + * 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 * src/support/date.C: new file diff --git a/src/support/kill.C b/src/support/kill.C index ba788b9479..e39ee9ecfa 100644 --- a/src/support/kill.C +++ b/src/support/kill.C @@ -3,9 +3,18 @@ #include #include +#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 diff --git a/src/support/lyxlib.h b/src/support/lyxlib.h index f7512a7c72..4c9d9a1b75 100644 --- a/src/support/lyxlib.h +++ b/src/support/lyxlib.h @@ -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 -- 2.39.2