[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog configure.ac libbase/rc.cpp [release_0_8_
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog configure.ac libbase/rc.cpp [release_0_8_1] |
Date: |
Tue, 21 Aug 2007 15:26:21 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: release_0_8_1
Changes by: Sandro Santilli <strk> 07/08/21 15:26:21
Modified files:
. : ChangeLog configure.ac
libbase : rc.cpp
Log message:
Patch by Benjamin Wolsey <address@hidden>:
* configure.ac: look for getpwnam
* libbase/rc.cpp (expandPath): don't try to use getpwnam
if not provided by OS.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.3971.2.49&r2=1.3971.2.50
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.396.2.6&r2=1.396.2.7
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.27.2.3&r2=1.27.2.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3971.2.49
retrieving revision 1.3971.2.50
diff -u -b -r1.3971.2.49 -r1.3971.2.50
--- ChangeLog 21 Aug 2007 13:29:03 -0000 1.3971.2.49
+++ ChangeLog 21 Aug 2007 15:26:20 -0000 1.3971.2.50
@@ -1,3 +1,9 @@
+2007-08-21 Benjamin Wolsey <address@hidden>
+
+ * configure.ac: look for getpwnam
+ * libbase/rc.cpp (expandPath): don't try to use getpwnam
+ if not provided by OS.
+
2007-08-21 Udo Giacomozzi <address@hidden>
* backend/render_handler_tri.cpp: fix world_to_pixel() so that OpenGL
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.396.2.6
retrieving revision 1.396.2.7
diff -u -b -r1.396.2.6 -r1.396.2.7
--- configure.ac 20 Aug 2007 18:09:28 -0000 1.396.2.6
+++ configure.ac 21 Aug 2007 15:26:21 -0000 1.396.2.7
@@ -15,7 +15,7 @@
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
dnl
-dnl $Id: configure.ac,v 1.396.2.6 2007/08/20 18:09:28 strk Exp $
+dnl $Id: configure.ac,v 1.396.2.7 2007/08/21 15:26:21 strk Exp $
AC_PREREQ(2.50)
AC_INIT(gnash, 0.8.1)
@@ -775,6 +775,7 @@
AC_CHECK_HEADERS(libgen.h)
AC_CHECK_HEADERS(pwd.h)
AC_CHECK_LIB(m, sqrt)
+AC_CHECK_LIB(c, getpwnam,AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
dnl don't look for X11 when using a raw framebuffer for the GUI
if test x$build_gtk = xyes -o x$build_kde = xyes -o x$build_fltk = xyes -o
x$build_sdl = xyes; then
Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.27.2.3
retrieving revision 1.27.2.4
diff -u -b -r1.27.2.3 -r1.27.2.4
--- libbase/rc.cpp 20 Aug 2007 23:19:44 -0000 1.27.2.3
+++ libbase/rc.cpp 21 Aug 2007 15:26:21 -0000 1.27.2.4
@@ -152,6 +152,8 @@
RcInitFile::expandPath (std::string& unixpath)
{
+
+//Don't break build on systems without passwd / getpwnam
string _expanded;
//Only if path starts with "~"
@@ -163,7 +165,10 @@
// if HOME set in env, replace ~ with HOME
_expanded = unixpath.replace(0,1,home);
}
+
+#ifdef HAVE_GETPWNAM
//HOME not set in env: try using pwd
+
else {
struct passwd *password = getpwuid(getuid());
const char *pwdhome = password->pw_dir;
@@ -171,6 +176,7 @@
//If all that fails, leave path alone
else _expanded = unixpath;
}
+
}
//Initial "~" is not followed by "/"
@@ -201,9 +207,22 @@
}
}
//Path doesn't start with ~, leave it alone.
+
+#else
+//For systems with pwd.h but not getpwnam, nothing to do if HOME not set.
+ else _expanded = unixpath;
+ }
+ else _expanded = unixpath;
+ }
+#endif
+
+
else {
_expanded = unixpath;
}
+
+
+
return _expanded;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog configure.ac libbase/rc.cpp [release_0_8_1],
Sandro Santilli <=