about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-01-31 13:28:12 +0000
committerUlrich Drepper <drepper@redhat.com>1998-01-31 13:28:12 +0000
commitf54de3b555f1458c7200ac45c21038f39669dbac (patch)
treeab1fe6b86e13f774f0762d1c2846fad349df18fb /sysdeps/generic
parent4d06461a76587c80359f6db5e1c6e4f4641d2663 (diff)
downloadglibc-f54de3b555f1458c7200ac45c21038f39669dbac.tar.gz
glibc-f54de3b555f1458c7200ac45c21038f39669dbac.tar.xz
glibc-f54de3b555f1458c7200ac45c21038f39669dbac.zip
Update.
1998-01-31 21:18  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/dl-sysdep.c (_dl_show_aux): Print newline after
	AT_PLATFORM string.  Pretty print AT_BASE info.

	* sysdeps/generic/dl-sysdep.c: Include <dl-procinfo.h>.
	(_dl_show_aux): Call _dl_procinfo to print AT_HWCAP info.
	* sysdeps/generic/dl-procinfo.h: New file.
	* sysdeps/unix/sysv/linux/dl-procinfo.h: New file.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/dl-procinfo.h27
-rw-r--r--sysdeps/generic/dl-sysdep.c16
2 files changed, 36 insertions, 7 deletions
diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h
new file mode 100644
index 0000000000..801d4b6fa1
--- /dev/null
+++ b/sysdeps/generic/dl-procinfo.h
@@ -0,0 +1,27 @@
+/* Stub version of processor capability information handling macros.
+   Copyright (C) 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _DL_PROCINFO_H
+#define _DL_PROCINFO_H	1
+
+/* We cannot provide a general printing function.  */
+#define _dl_procinfo(word) -1
+
+#endif /* dl-procinfo.h */
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index b2ae75cc9e..b007aa6b9d 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -1,5 +1,5 @@
 /* Operating system support for run-time dynamic linker.  Generic Unix version.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
 #include <stdio-common/_itoa.h>
 
 #include <dl-machine.h>
+#include <dl-procinfo.h>
 
 extern int _dl_argc;
 extern char **_dl_argv;
@@ -201,7 +202,7 @@ _dl_show_auxv (void)
 			    "\n", NULL);
 	break;
       case AT_BASE:
-	_dl_sysdep_message ("AT_BASE:    0x",
+	_dl_sysdep_message ("AT_BASE:     0x",
 			    _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
 					16, 0),
 			    "\n", NULL);
@@ -231,13 +232,14 @@ _dl_show_auxv (void)
 			    "\n", NULL);
 	break;
       case AT_PLATFORM:
-	_dl_sysdep_message ("AT_PLATFORM: ", av->a_un.a_ptr, NULL);
+	_dl_sysdep_message ("AT_PLATFORM: ", av->a_un.a_ptr, "\n", NULL);
 	break;
       case AT_HWCAP:
-	_dl_sysdep_message ("AT_HWCAP:    ",
-			    _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
-					16, 0),
-			    "\n", NULL);
+	if (_dl_procinfo (av->a_un.a_val) < 0)
+	  _dl_sysdep_message ("AT_HWCAP:    ",
+			      _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+					  16, 0),
+			      "\n", NULL);
 	break;
       }
 }