mirror of
https://github.com/troglobit/editline.git
synced 2025-05-05 20:11:12 +08:00
Build fixes when building with GCC v4.3.2 and -W -Wall -Werror
This commit is contained in:
parent
62e900a061
commit
77d483da02
@ -19,6 +19,9 @@
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
|
23
configure
vendored
23
configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for Minix editline 0.2.2.
|
||||
# Generated by GNU Autoconf 2.61 for Minix editline 0.2.3.
|
||||
#
|
||||
# Report bugs to <joachim@vmlinux.org>.
|
||||
#
|
||||
@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='Minix editline'
|
||||
PACKAGE_TARNAME='minix-editline'
|
||||
PACKAGE_VERSION='0.2.2'
|
||||
PACKAGE_STRING='Minix editline 0.2.2'
|
||||
PACKAGE_VERSION='0.2.3'
|
||||
PACKAGE_STRING='Minix editline 0.2.3'
|
||||
PACKAGE_BUGREPORT='joachim@vmlinux.org'
|
||||
|
||||
ac_unique_file="src/editline.c"
|
||||
@ -1210,7 +1210,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures Minix editline 0.2.2 to adapt to many kinds of systems.
|
||||
\`configure' configures Minix editline 0.2.3 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1276,7 +1276,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of Minix editline 0.2.2:";;
|
||||
short | recursive ) echo "Configuration of Minix editline 0.2.3:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1361,7 +1361,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
Minix editline configure 0.2.2
|
||||
Minix editline configure 0.2.3
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@ -1375,7 +1375,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by Minix editline $as_me 0.2.2, which was
|
||||
It was created by Minix editline $as_me 0.2.3, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -2070,7 +2070,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='minix-editline'
|
||||
VERSION='0.2.2'
|
||||
VERSION='0.2.3'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -4879,7 +4879,8 @@ fi
|
||||
|
||||
|
||||
|
||||
for ac_func in strchr strdup strrchr tcgetattr
|
||||
|
||||
for ac_func in strchr strdup strrchr tcgetattr perror
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
@ -5421,7 +5422,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by Minix editline $as_me 0.2.2, which was
|
||||
This file was extended by Minix editline $as_me 0.2.3, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -5474,7 +5475,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
Minix editline config.status 0.2.2
|
||||
Minix editline config.status 0.2.3
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT(Minix editline, 0.2.2, joachim@vmlinux.org)
|
||||
AC_INIT(Minix editline, 0.2.3, joachim@vmlinux.org)
|
||||
AC_CONFIG_SRCDIR([src/editline.c])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
@ -38,7 +38,7 @@ AC_PROG_GCC_TRADITIONAL
|
||||
#AC_FUNC_MALLOC
|
||||
#AC_FUNC_REALLOC
|
||||
AC_FUNC_STAT
|
||||
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr])
|
||||
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr perror])
|
||||
|
||||
AC_ARG_ENABLE([default-complete],
|
||||
[ --enable-default-complete Enable default completion handler.],[
|
||||
|
@ -62,7 +62,7 @@ int my_rl_list_possib(char *token, char ***av)
|
||||
return total;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
int main(int ac __attribute__ ((unused)), char *av[] __attribute__ ((unused)))
|
||||
{
|
||||
char *line;
|
||||
char *prompt = "cli> ";
|
||||
|
@ -3,25 +3,35 @@
|
||||
** A "micro-shell" to test editline library.
|
||||
** If given any arguments, commands aren't executed.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#if defined(HAVE_STDLIB)
|
||||
#if defined(HAVE_STDLIB_H)
|
||||
#include <stdlib.h>
|
||||
#endif /* defined(HAVE_STDLIB) */
|
||||
#endif
|
||||
#if defined(HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
extern char *readline();
|
||||
extern void add_history();
|
||||
|
||||
#if !defined(HAVE_STDLIB)
|
||||
extern int chdir();
|
||||
#if !defined(HAVE_STDLIB_H)
|
||||
extern int free();
|
||||
extern int strncmp();
|
||||
extern int system();
|
||||
extern void exit();
|
||||
extern char *getenv();
|
||||
#endif /* !defined(HAVE_STDLIB) */
|
||||
#if !defined(HAVE_STRING_H)
|
||||
extern int strncmp();
|
||||
#endif
|
||||
#if !defined(HAVE_UNISTD_H)
|
||||
extern int chdir();
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(NEED_PERROR)
|
||||
#if !defined(HAVE_PERROR)
|
||||
void
|
||||
perror(s)
|
||||
char *s;
|
||||
@ -37,7 +47,7 @@ perror(s)
|
||||
int
|
||||
main(ac, av)
|
||||
int ac;
|
||||
char *av[];
|
||||
char *av[] __attribute__ ((unused));
|
||||
{
|
||||
char *prompt;
|
||||
char *p;
|
||||
@ -45,7 +55,7 @@ main(ac, av)
|
||||
|
||||
doit = ac == 1;
|
||||
if ((prompt = getenv("TESTPROMPT")) == NULL)
|
||||
prompt = "testit> ";
|
||||
prompt = "testit> ";
|
||||
|
||||
while ((p = readline(prompt)) != NULL) {
|
||||
(void)printf("\t\t\t|%s|\n", p);
|
||||
|
@ -174,7 +174,7 @@ TTYstring(p)
|
||||
TTYshow(*p++);
|
||||
}
|
||||
|
||||
STATIC unsigned int
|
||||
STATIC int
|
||||
TTYget()
|
||||
{
|
||||
CHAR c;
|
||||
@ -831,7 +831,7 @@ insert_char(c)
|
||||
STATIC STATUS
|
||||
meta()
|
||||
{
|
||||
unsigned int c;
|
||||
int c;
|
||||
KEYMAP *kp;
|
||||
|
||||
if ((c = TTYget()) == EOF)
|
||||
@ -895,7 +895,7 @@ emacs(c)
|
||||
|
||||
STATIC STATUS
|
||||
TTYspecial(c)
|
||||
unsigned int c;
|
||||
int c;
|
||||
{
|
||||
if (rl_meta_chars && ISMETA(c))
|
||||
return CSdispatch;
|
||||
@ -933,7 +933,7 @@ TTYspecial(c)
|
||||
STATIC CHAR *
|
||||
editinput()
|
||||
{
|
||||
unsigned int c;
|
||||
int c;
|
||||
|
||||
Repeat = NO_ARG;
|
||||
OldPoint = Point = Mark = End = 0;
|
||||
@ -1031,7 +1031,7 @@ read_redirected(void)
|
||||
/* ARGSUSED0 */
|
||||
void
|
||||
rl_reset_terminal(p)
|
||||
char *p;
|
||||
char *p __attribute__((__unused__));
|
||||
{
|
||||
}
|
||||
|
||||
@ -1110,7 +1110,7 @@ readline(prompt)
|
||||
|
||||
void
|
||||
add_history(p)
|
||||
char *p;
|
||||
char *p __attribute__ ((unused));
|
||||
{
|
||||
#ifdef obsolete /* Made part of readline(). -- kjb */
|
||||
if (p == NULL || *p == '\0')
|
||||
@ -1288,7 +1288,7 @@ transpose()
|
||||
STATIC STATUS
|
||||
quote()
|
||||
{
|
||||
unsigned int c;
|
||||
int c;
|
||||
|
||||
return (c = TTYget()) == EOF ? CSeof : insert_char((int)c);
|
||||
}
|
||||
@ -1321,7 +1321,7 @@ mk_set()
|
||||
STATIC STATUS
|
||||
exchange()
|
||||
{
|
||||
unsigned int c;
|
||||
int c;
|
||||
|
||||
if ((c = TTYget()) != CTL('X'))
|
||||
return c == EOF ? CSeof : ring_bell();
|
||||
@ -1359,7 +1359,7 @@ copy_region()
|
||||
STATIC STATUS
|
||||
move_to_char()
|
||||
{
|
||||
unsigned int c;
|
||||
int c;
|
||||
int i;
|
||||
CHAR *p;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user