Browse Source

fix screen on platforms with non-trival va_arg implementation (e.g. PowerPC)

and it's buggy configure script ...


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1183 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 23 years ago
parent
commit
128fdca92d
3 changed files with 204 additions and 10 deletions
  1. +1
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +144
    -10
      package/base/screen/configure_pam.patch
  3. +59
    -0
      package/base/screen/correct_va_list.patch

+ 1
- 0
Documentation/Developers/CHANGELOG-RENE

@ -7,6 +7,7 @@
- added support for targets to suply text/plain kernel config files - added support for targets to suply text/plain kernel config files
(fixes the bug that users can not supply kernel configs for the desktop (fixes the bug that users can not supply kernel configs for the desktop
target) target)
- fixed screen for platforms with non-trival va_arg implementaion
*) 2003-08-24 (2.0.0-rc1 - 2.0.0-rc2) *) 2003-08-24 (2.0.0-rc1 - 2.0.0-rc2)

+ 144
- 10
package/base/screen/configure_pam.patch

@ -1,3 +1,4 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
# #
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
@ -20,14 +21,147 @@
# #
# --- ROCK-COPYRIGHT-NOTE-END --- # --- ROCK-COPYRIGHT-NOTE-END ---
--- ./configure.orig 2003-03-10 10:10:09.000000000 +0100
+++ ./configure 2003-03-10 10:10:21.000000000 +0100
@@ -7017,7 +7017,7 @@
echo "$as_me:$LINENO: checking for PAM support" >&5
echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
oldlibs="$LIBS"
- LIBS="$LIBS -lpam"
Not only is libpam_misc needed, it is also needed earlier to not let
all the other tests fail when other libs have dependencies to libpam
or libpam_misc ...
(Especially important to not let the vsprintf test fail and so the
VA_* macros are not used!)
- Clifford Wold <clifford@clifford.at> and Rene Rebe <rene@rocklinux.org>
--- ./configure.orig 2003-02-24 14:03:33.000000000 +0100
+++ ./configure 2003-08-26 01:47:59.000000000 +0200
@@ -6624,6 +6624,66 @@
fi
rm -f /tmp/conftest*
+
+# Check whether --enable-pam or --disable-pam was given.
+if test "${enable_pam+set}" = set; then
+ enableval="$enable_pam"
+
+fi;
+if test "$enable_pam" = "yes"; then
+ echo "$as_me:$LINENO: checking for PAM support" >&5
+echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpam -lpam_misc" + LIBS="$LIBS -lpam -lpam_misc"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <security/pam_appl.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ pam_start(0, 0, 0, 0);
+ pam_authenticate(0, 0);
+ pam_end(0,0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
+#define USE_PAM 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6;LIBS="$oldlibs"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+
echo "$as_me:$LINENO: checking for vsprintf" >&5
echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
@@ -7287,65 +7347,6 @@
fi
done
-
-# Check whether --enable-pam or --disable-pam was given.
-if test "${enable_pam+set}" = set; then
- enableval="$enable_pam"
-
-fi;
-if test "$enable_pam" = "yes"; then
- echo "$as_me:$LINENO: checking for PAM support" >&5
-echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
- oldlibs="$LIBS"
- LIBS="$LIBS -lpam"
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <security/pam_appl.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-
- pam_start(0, 0, 0, 0);
- pam_authenticate(0, 0);
- pam_end(0,0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
-#define USE_PAM 1
-_ACEOF
-
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6;LIBS="$oldlibs"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-
# Check whether --enable-use_locale or --disable-use_locale was given.
if test "${enable_use_locale+set}" = set; then
enableval="$enable_use_locale"

+ 59
- 0
package/base/screen/correct_va_list.patch

@ -0,0 +1,59 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/screen/correct_va_list.patch
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
On some architectures that either store the variable args as an array
of pointers (of length 1) or they are passed in registers (see man va_arg)
the macro va_copy is needed ....
- Rene Rebe <rene@rocklinux.org>
--- ./screen.c.orig 2003-02-24 18:03:47.000000000 +0100
+++ ./screen.c 2003-08-26 01:19:42.000000000 +0200
@@ -377,7 +377,7 @@
#ifdef DEBUG
opendebug(1, 0);
#endif
- sprintf(version, "%d.%.2d.%.2d%s (%s) %s", REV, VERS,
+ snprintf(version, 40, "%d.%.2d.%.2d%s (%s) %s", REV, VERS,
PATCHLEVEL, STATE, ORIGIN, DATE);
nversion = REV * 10000 + VERS * 100 + PATCHLEVEL;
debug2("-- screen debug started %s (%s)\n", *av, version);
@@ -1943,13 +1943,16 @@
VA_DECL
#endif
{
- VA_LIST(ap)
+ VA_LIST(ap);
+ VA_LIST(aq);
char buf[MAXPATHLEN*2];
char *p = buf;
VA_START(ap, fmt);
+ va_copy (aq, ap);
fmt = DoNLS(fmt);
- (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap));
+ (void)vsnprintf(p, sizeof(buf) - 100, fmt, aq);
+ VA_END(aq);
VA_END(ap);
if (err)
{

Loading…
Cancel
Save