]> git.lyx.org Git - features.git/commitdiff
use namespace in lyxlib if available
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 17 Jan 2000 22:42:04 +0000 (22:42 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 17 Jan 2000 22:42:04 +0000 (22:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@424 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/support/kill.C
src/support/lyxlib.h

index 54d2887f83b6387ce783ba0baa4444787c96d73d..e83e229bd05f66b1c591ae27b9d3ec8419b72f69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index ba788b94793a681fc94d57a224344a06e25103b4..e39ee9ecfab2be5e62b417c1e2e30aa81dcf9a43 100644 (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
index f7512a7c72032bd0756d428348a3c52b0ac95bb5..4c9d9a1b754d8c2292b1c86a8692cd05d496ec39 100644 (file)
 // (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