summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac16
-rw-r--r--lib/timegm.c4
-rw-r--r--src/xine-utils/utils.c16
4 files changed, 22 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index e2e81fc8b..e9b0c3ce0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,9 @@ xine-lib (1.1.11) unreleased
plugin directory name is 1.19, and if this gets bumped to 1.20 in a
future release, 1.19 will still be available for external plugins.
(Any directories not 1.* won't be looked in.)
+ * Made the version parsing much more reliable; it wasn't properly coping
+ with four-part version numbers. This affects any program whose build
+ scripts use xine-lib's automake macros.
xine-lib (1.1.10.1) 2008-02-07
* Security fixes:
diff --git a/configure.ac b/configure.ac
index 15252782c..8d2674e59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,7 +627,7 @@ case "$host_or_hostalias" in
;;
x86_64-*)
- arch_x86=yes
+ arch_x86=64
AC_DEFINE([ARCH_X86_64], [], [Define this if you're running x86 architecture 64 bits])
;;
@@ -635,10 +635,10 @@ case "$host_or_hostalias" in
case "$host_or_hostalias" in
universal-*)
arch_ppc=yes
- arch_x86=yes
+ arch_x86=32
;;
i386-* | x86_64-*)
- arch_x86=yes
+ arch_x86=32
AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits])
;;
ppc* | powerpc*)
@@ -682,7 +682,7 @@ case "$host_or_hostalias" in
;;
i?86-* | k?-* | athlon-* | pentium*)
- arch_x86=yes
+ arch_x86=32
enable_impure_text=yes
case "$host_or_hostalias" in
@@ -800,13 +800,15 @@ AC_SUBST(PASS2_CFLAGS)
test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)'
AC_SUBST(DEFAULT_OCFLAGS)
-if test x"$arch_x86" = x"yes" && test x"$enable_macosx_universal" = x"no"; then
+if test x"$arch_x86" != x"no" && test x"$enable_macosx_universal" = x"no"; then
AC_DEFINE([ARCH_X86], [], [Define this if you're running x86 architecture])
AC_DEFINE([HAVE_MMX], [], [Define this if you can compile MMX asm instructions])
fi
AM_CONDITIONAL([ARCH_PPC], test x"$arch_ppc" = x"yes")
-AM_CONDITIONAL([ARCH_X86], test x"$arch_x86" = x"yes")
-AM_CONDITIONAL([HAVE_MMX], test x"$arch_x86" = x"yes")
+AM_CONDITIONAL([ARCH_X86], test x"$arch_x86" != x"no")
+AM_CONDITIONAL([ARCH_X86_32], test x"$arch_x86" = x"32")
+AM_CONDITIONAL([ARCH_X86_64], test x"$arch_x86" = x"64")
+AM_CONDITIONAL([HAVE_MMX], test x"$arch_x86" != x"no")
AM_CONDITIONAL([HOST_OS_DARWIN], test x"$HOST_OS_DARWIN" = x"1")
if test x"$enable_impure_text" = x"yes"; then
diff --git a/lib/timegm.c b/lib/timegm.c
index 588131afb..e86e66370 100644
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -5,15 +5,19 @@
time_t xine_private_timegm(struct tm *tm) {
time_t ret;
+#if defined(HAVE_TZSET)
char *tz;
tz = getenv("TZ");
setenv("TZ", "", 1);
tzset();
+#endif
ret = mktime(tm);
+#if defined(HAVE_TZSET)
if (tz) setenv("TZ", tz, 1);
else unsetenv("TZ");
tzset();
+#endif
return ret;
}
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index 8421b2374..c414f481f 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -358,22 +358,18 @@ const char *xine_get_homedir(void) {
char *s;
int len;
- if (!homedir[0]) {
- len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir));
- s = strdup(homedir);
- GetFullPathName(s, sizeof(homedir), homedir, NULL);
- free(s);
- if ((s = strrchr(homedir, '\\'))) *s = '\0';
- }
+ len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir));
+ s = strdup(homedir);
+ GetFullPathName(s, sizeof(homedir), homedir, NULL);
+ free(s);
+ if ((s = strrchr(homedir, '\\')))
+ *s = '\0';
return homedir;
#else
struct passwd pwd, *pw = NULL;
static char homedir[BUFSIZ] = {0,};
- if(homedir[0])
- return homedir;
-
#ifdef HAVE_GETPWUID_R
if(getpwuid_r(getuid(), &pwd, homedir, sizeof(homedir), &pw) != 0 || pw == NULL) {
#else