2003-12-03 Marco Gerards <metgerards@student.han.nl>
* fs/ext2.c (pupa_ext2_label): New function. (pupa_ext2_fs): Added label. * fs/fat.c (pupa_fat_label): New function. (pupa_fat_fs): Added label. * include/pupa/fs.h (struct pupa_fs): Added prototype label. * kern/misc.c (pupa_strndup): New function. * include/pupa/misc.h (pupa_strndup): New prototype. * include/pupa/normal.h: Include <pupa/err.h>. (pupa_set_history): New prototype. (pupa_iterate_commands): New prototype. * normal/cmdline.c: Include <pupa/machine/partition.h>, <pupa/disk.h>, <pupa/file.h>. (hist_size): New variable. (hist_lines): Likewise. (hist_end): Likewise. (hist_used): Likewise. (pupa_set_history): New function. (pupa_history_get): Likewise. (pupa_history_add): Likewise. (pupa_history_replace): Likewise. (pupa_tab_complete): Likewise. (pupa_cmdline_run): Added tab completion and history buffer. Tab completion shows partitionnames while completing partitions, this feature was suggested by Jeff Bailey. * normal/command.c (pupa_iterate_commands): New function. * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro. (pupa_normal_init): Initialize history buffer. (PUPA_MOD_INIT): Likewise. (pupa_normal_fini): Free the history buffer. (PUPA_MOD_FINI): Likewise. * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace key. * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN. * configure.ac [i386]: Check for regparam bug. (NESTED_FUNC_ATTR) [! i386]: Defined.
This commit is contained in:
parent
1f7315a3de
commit
5aded270b6
15 changed files with 793 additions and 6 deletions
84
configure
vendored
84
configure
vendored
|
@ -3253,9 +3253,93 @@ fi
|
|||
|
||||
echo "$as_me:$LINENO: result: $pupa_cv_i386_asm_absolute_without_asterisk" >&5
|
||||
echo "${ECHO_T}$pupa_cv_i386_asm_absolute_without_asterisk" >&6
|
||||
|
||||
echo "$as_me:$LINENO: checking if GCC has the regparm=3 bug" >&5
|
||||
echo $ECHO_N "checking if GCC has the regparm=3 bug... $ECHO_C" >&6
|
||||
if test "${pupa_cv_i386_check_nested_functions+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
int *p;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int test;
|
||||
|
||||
int __attribute__ ((__regparm__ (3))) nestedfunc (int a, int b, int c)
|
||||
{
|
||||
return (&test == p);
|
||||
}
|
||||
|
||||
p = &test;
|
||||
return nestedfunc (0, 0, 0);
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
rm -f 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='./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
|
||||
pupa_cv_i386_check_nested_functions=yes
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
pupa_cv_i386_check_nested_functions=no
|
||||
fi
|
||||
rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: result: $pupa_cv_i386_check_nested_functions" >&5
|
||||
echo "${ECHO_T}$pupa_cv_i386_check_nested_functions" >&6
|
||||
|
||||
if test "x$pupa_cv_i386_check_nested_functions" = xyes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (2)))
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define NESTED_FUNC_ATTR
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define NESTED_FUNC_ATTR
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
# incompatible versions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue