]> git.lyx.org Git - lyx.git/blobdiff - src/support/userinfo.C
make "make distcheck" work
[lyx.git] / src / support / userinfo.C
index 5bcc9a3ac454d33f546c02e6177d63fc2b524586..758ce34572a9e0e8f755ec938a66c5989fc2c01f 100644 (file)
 
 #include <config.h>
 
-#include "userinfo.h"
-#include "LAssert.h"
-#include "filetools.h"
+#include "support/userinfo.h"
+#include "support/environment.h"
+
+#include <boost/assert.hpp>
 
 #include <pwd.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #include <sys/types.h>
 
+using std::string;
+
 namespace lyx {
 namespace support {
 
 string const user_name()
 {
        struct passwd * pw(getpwuid(geteuid()));
-       Assert(pw);
+       BOOST_ASSERT(pw);
 
        string name = pw->pw_gecos;
        if (name.empty())
@@ -35,9 +40,9 @@ string const user_name()
 
 string const user_email()
 {
-       string email = GetEnv("EMAIL_ADDRESS");
+       string email = getEnv("EMAIL_ADDRESS");
        if (email.empty())
-               email = GetEnv("EMAIL");
+               email = getEnv("EMAIL");
        return email;
 }