summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-07-06 11:34:10 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-07-06 11:34:10 +0000
commit63a45384a5fc6ae316918d8377ad0d8fbe52e1c2 (patch)
tree142f6f2f97a40550cc0c41d453f4931e565fea46 /c/src
parent2005-07-06 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-63a45384a5fc6ae316918d8377ad0d8fbe52e1c2.tar.bz2
2005-07-06 Ralf Corsepius <ralf.corsepius@rtems.org>
* console/keyboard.c: Apply CHAR_BIT to compute BITS_PER_LONG.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog4
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/keyboard.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index 12118275e0..f8f65b9357 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -1,3 +1,7 @@
+2005-07-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * console/keyboard.c: Apply CHAR_BIT to compute BITS_PER_LONG.
+
2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
* include/bsp.h: New header guard.
diff --git a/c/src/lib/libbsp/i386/pc386/console/keyboard.c b/c/src/lib/libbsp/i386/pc386/console/keyboard.c
index b7cb3df19a..746f631a61 100644
--- a/c/src/lib/libbsp/i386/pc386/console/keyboard.c
+++ b/c/src/lib/libbsp/i386/pc386/console/keyboard.c
@@ -4,6 +4,7 @@
* Rosimildo da Silva: rdasilva@connecttel.com
*/
+#include <limits.h>
#include <sys/types.h>
#include <rtems/keyboard.h>
#include "i386kbd.h"
@@ -74,7 +75,7 @@ int test_bit(int nr, unsigned long * addr)
* in this module: prev_scancode, shift_state, diacr, npadch, dead_key_next.
* (last_console is now a global variable)
*/
-#define BITS_PER_LONG 32
+#define BITS_PER_LONG (sizeof(long)*CHAR_BIT)
/* shift state counters.. */
static unsigned char k_down[NR_SHIFT] = {0, };