mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
52750: remove ansi2knr support for old pre-ansi K&R compilers
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
|||||||
|
2024-03-18 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 52750: Config/defs.mk.in, Etc/zsh-development-guide,
|
||||||
|
Src/Makemod.in.in, Src/Modules/files.c, Src/Modules/watch.c,
|
||||||
|
Src/Modules/zftp.c, Src/Modules/zprof.c, Src/Zle/compcore.c,
|
||||||
|
Src/Zle/zle.h, Src/Zle/zle_keymap.c, Src/Zle/zle_thingy.c,
|
||||||
|
Src/exec.c, Src/glob.c, Src/hist.c, Src/makepro.awk, Src/mem.c,
|
||||||
|
Src/mkbltnmlst.sh, Src/modentry.c, Src/parse.c, Src/prototypes.h,
|
||||||
|
Src/signals.h, Src/utils.c, Src/zsh.h, Src/zsh_system.h, aclocal.m4,
|
||||||
|
configure.ac: remove ansi2knr support for old pre-ansi K&R compilers
|
||||||
|
|
||||||
2024-03-14 Bart Schaefer <schaefer@zsh.org>
|
2024-03-14 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 52759: Doc/Zsh/expn.yo, Etc/FAQ.yo, Src/subst.c,
|
* 52759: Doc/Zsh/expn.yo, Etc/FAQ.yo, Src/subst.c,
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ IMPOPT = @IMPOPT@
|
|||||||
|
|
||||||
# utilities
|
# utilities
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
ANSI2KNR = @ANSI2KNR@
|
|
||||||
YODL = @YODL@ @YODL_OPTIONS@
|
YODL = @YODL@ @YODL_OPTIONS@
|
||||||
YODL2TXT = @YODL@2txt
|
YODL2TXT = @YODL@2txt
|
||||||
YODL2HTML = @YODL@2html
|
YODL2HTML = @YODL@2html
|
||||||
@@ -100,7 +99,7 @@ LDFLAGS='$(LDFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' \
|
|||||||
DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \
|
DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \
|
||||||
LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \
|
LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \
|
||||||
LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \
|
LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \
|
||||||
AWK='$(AWK)' ANSI2KNR='$(ANSI2KNR)' \
|
AWK='$(AWK)' \
|
||||||
YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)' \
|
YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)' \
|
||||||
FUNCTIONS_INSTALL='$(FUNCTIONS_INSTALL)' tzsh='$(tzsh)'
|
FUNCTIONS_INSTALL='$(FUNCTIONS_INSTALL)' tzsh='$(tzsh)'
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ C coding style
|
|||||||
There must be an empty line, a line with "/**/", a line with the
|
There must be an empty line, a line with "/**/", a line with the
|
||||||
type of the function, and finally the name of the function with typed
|
type of the function, and finally the name of the function with typed
|
||||||
arguments. These lines must not be indented. The script generating
|
arguments. These lines must not be indented. The script generating
|
||||||
function prototypes and the ansi2knr program depend on this format.
|
function prototypes depends on this format.
|
||||||
|
|
||||||
* Variable declarations must similarly be preceded by a
|
* Variable declarations must similarly be preceded by a
|
||||||
line containing only "/**/", for the prototype generation script.
|
line containing only "/**/", for the prototype generation script.
|
||||||
|
|||||||
@@ -52,32 +52,17 @@ DLCOMPILE = $(CC) -c -I. -I$(dir_top)/Src -I$(sdir_top)/Src -I$(sdir_top)/Src/
|
|||||||
LINK = $(CC) $(LDFLAGS) $(EXELDFLAGS) $(EXTRA_LDFLAGS) -o $@
|
LINK = $(CC) $(LDFLAGS) $(EXELDFLAGS) $(EXTRA_LDFLAGS) -o $@
|
||||||
DLLINK = $(DLLD) $(LDFLAGS) $(LIBLDFLAGS) $(DLLDFLAGS) -o $@
|
DLLINK = $(DLLD) $(LDFLAGS) $(LIBLDFLAGS) $(DLLDFLAGS) -o $@
|
||||||
|
|
||||||
KNR_OBJ=.o
|
OBJ=.o
|
||||||
KNROBJ=._foo_
|
|
||||||
|
|
||||||
ANSIOBJ=.o
|
.SUFFIXES: .c .$(DL_EXT) ..o .o .syms .pro .epro
|
||||||
ANSI_OBJ=._foo_
|
|
||||||
|
|
||||||
.SUFFIXES: .c .$(DL_EXT) ..o .._foo_ .o ._foo_ .syms .pro .epro
|
.c$(OBJ):
|
||||||
|
|
||||||
.c$(ANSI@U@OBJ):
|
|
||||||
$(COMPILE) -o $@ $<
|
$(COMPILE) -o $@ $<
|
||||||
@rm -f $(dir_src)/stamp-modobjs
|
@rm -f $(dir_src)/stamp-modobjs
|
||||||
|
|
||||||
.c$(KNR@U@OBJ):
|
.c.$(OBJ):
|
||||||
@ANSI2KNR@ $< > $@.c
|
|
||||||
$(COMPILE) -o $@ $@.c
|
|
||||||
rm -f $@.c
|
|
||||||
@rm -f $(dir_src)/stamp-modobjs
|
|
||||||
|
|
||||||
.c.$(ANSI@U@OBJ):
|
|
||||||
$(DLCOMPILE) -o $@ $<
|
$(DLCOMPILE) -o $@ $<
|
||||||
|
|
||||||
.c.$(KNR@U@OBJ):
|
|
||||||
@ANSI2KNR@ $< > $@.c
|
|
||||||
$(DLCOMPILE) -o $@ $@.c
|
|
||||||
rm -f $@.c
|
|
||||||
|
|
||||||
.c.syms:
|
.c.syms:
|
||||||
$(AWK) -f $(sdir_src)/makepro.awk $< $(subdir) > $@
|
$(AWK) -f $(sdir_src)/makepro.awk $< $(subdir) > $@
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
#include "files.mdh"
|
#include "files.mdh"
|
||||||
|
|
||||||
typedef int (*MoveFunc) _((char const *, char const *));
|
typedef int (*MoveFunc) (char const *, char const *);
|
||||||
typedef int (*RecurseFunc) _((char *, char *, struct stat const *, void *));
|
typedef int (*RecurseFunc) (char *, char *, struct stat const *, void *);
|
||||||
|
|
||||||
struct recursivecmd;
|
struct recursivecmd;
|
||||||
|
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ readwtab(WATCH_STRUCT_UTMP **head, int initial_sz)
|
|||||||
|
|
||||||
if (sz)
|
if (sz)
|
||||||
qsort((void *) *head, sz, sizeof(WATCH_STRUCT_UTMP),
|
qsort((void *) *head, sz, sizeof(WATCH_STRUCT_UTMP),
|
||||||
(int (*) _((const void *, const void *)))ucmp);
|
(int (*) (const void *, const void *))ucmp);
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ typedef int (*readwrite_t)(int, char *, off_t, int);
|
|||||||
|
|
||||||
struct zftpcmd {
|
struct zftpcmd {
|
||||||
const char *nam;
|
const char *nam;
|
||||||
int (*fun) _((char *, char **, int));
|
int (*fun) (char *, char **, int);
|
||||||
int min, max, flags;
|
int min, max, flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -163,9 +163,9 @@ bin_zprof(UNUSED(char *nam), UNUSED(char **args), Options ops, UNUSED(int func))
|
|||||||
*ap = NULL;
|
*ap = NULL;
|
||||||
|
|
||||||
qsort(fs, ncalls, sizeof(f),
|
qsort(fs, ncalls, sizeof(f),
|
||||||
(int (*) _((const void *, const void *))) cmpsfuncs);
|
(int (*) (const void *, const void *)) cmpsfuncs);
|
||||||
qsort(as, narcs, sizeof(a),
|
qsort(as, narcs, sizeof(a),
|
||||||
(int (*) _((const void *, const void *))) cmpparcs);
|
(int (*) (const void *, const void *)) cmpparcs);
|
||||||
|
|
||||||
printf("num calls time self name\n-----------------------------------------------------------------------------------\n");
|
printf("num calls time self name\n-----------------------------------------------------------------------------------\n");
|
||||||
for (fp = fs, i = 1; *fp; fp++, i++) {
|
for (fp = fs, i = 1; *fp; fp++, i++) {
|
||||||
@@ -179,7 +179,7 @@ bin_zprof(UNUSED(char *nam), UNUSED(char **args), Options ops, UNUSED(int func))
|
|||||||
(*fp)->name);
|
(*fp)->name);
|
||||||
}
|
}
|
||||||
qsort(fs, ncalls, sizeof(f),
|
qsort(fs, ncalls, sizeof(f),
|
||||||
(int (*) _((const void *, const void *))) cmptfuncs);
|
(int (*) (const void *, const void *)) cmptfuncs);
|
||||||
|
|
||||||
for (fp = fs; *fp; fp++) {
|
for (fp = fs; *fp; fp++) {
|
||||||
printf("\n-----------------------------------------------------------------------------------\n\n");
|
printf("\n-----------------------------------------------------------------------------------\n\n");
|
||||||
|
|||||||
@@ -3253,7 +3253,7 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
|
|||||||
/* Now sort the array (it contains matches). */
|
/* Now sort the array (it contains matches). */
|
||||||
matchorder = flags;
|
matchorder = flags;
|
||||||
qsort((void *) rp, n, sizeof(Cmatch),
|
qsort((void *) rp, n, sizeof(Cmatch),
|
||||||
(int (*) _((const void *, const void *)))matchcmp);
|
(int (*) (const void *, const void *))matchcmp);
|
||||||
|
|
||||||
/* since the matches are sorted and the default is to remove
|
/* since the matches are sorted and the default is to remove
|
||||||
* all duplicates, -1 (remove only consecutive dupes) is a no-op,
|
* all duplicates, -1 (remove only consecutive dupes) is a no-op,
|
||||||
@@ -3295,7 +3295,7 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp)
|
|||||||
sp = (Cmatch *) zhalloc((n + 1) * sizeof(Cmatch));
|
sp = (Cmatch *) zhalloc((n + 1) * sizeof(Cmatch));
|
||||||
memcpy(sp, rp, (n + 1) * sizeof(Cmatch));
|
memcpy(sp, rp, (n + 1) * sizeof(Cmatch));
|
||||||
qsort((void *) sp, n, sizeof(Cmatch),
|
qsort((void *) sp, n, sizeof(Cmatch),
|
||||||
(int (*) _((const void *, const void *)))matchcmp);
|
(int (*) (const void *, const void *))matchcmp);
|
||||||
for (asp = sp + 1; *asp; asp++) {
|
for (asp = sp + 1; *asp; asp++) {
|
||||||
Cmatch *ap = asp - 1, *bp = asp;
|
Cmatch *ap = asp - 1, *bp = asp;
|
||||||
if (matcheq(*ap, *bp)) {
|
if (matcheq(*ap, *bp)) {
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ typedef struct thingy *Thingy;
|
|||||||
|
|
||||||
/* widgets (ZLE functions) */
|
/* widgets (ZLE functions) */
|
||||||
|
|
||||||
typedef int (*ZleIntFunc) _((char **));
|
typedef int (*ZleIntFunc) (char **);
|
||||||
|
|
||||||
struct widget {
|
struct widget {
|
||||||
int flags; /* flags (see below) */
|
int flags; /* flags (see below) */
|
||||||
@@ -319,7 +319,7 @@ struct vichange {
|
|||||||
|
|
||||||
typedef struct keymap *Keymap;
|
typedef struct keymap *Keymap;
|
||||||
|
|
||||||
typedef void (*KeyScanFunc) _((char *, Thingy, char *, void *));
|
typedef void (*KeyScanFunc) (char *, Thingy, char *, void *);
|
||||||
|
|
||||||
#define invicmdmode() (!strcmp(curkeymapname, "vicmd"))
|
#define invicmdmode() (!strcmp(curkeymapname, "vicmd"))
|
||||||
|
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ bin_bindkey(char *name, char **argv, Options ops, UNUSED(int func))
|
|||||||
static struct opn {
|
static struct opn {
|
||||||
char o;
|
char o;
|
||||||
char selp;
|
char selp;
|
||||||
int (*func) _((char *, char *, Keymap, char **, Options, char));
|
int (*func) (char *, char *, Keymap, char **, Options, char);
|
||||||
int min, max;
|
int min, max;
|
||||||
} const opns[] = {
|
} const opns[] = {
|
||||||
{ 'l', 0, bin_bindkey_lsmaps, 0, -1 },
|
{ 'l', 0, bin_bindkey_lsmaps, 0, -1 },
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ bin_zle(char *name, char **args, Options ops, UNUSED(int func))
|
|||||||
{
|
{
|
||||||
static struct opn {
|
static struct opn {
|
||||||
char o;
|
char o;
|
||||||
int (*func) _((char *, char **, Options, char));
|
int (*func) (char *, char **, Options, char);
|
||||||
int min, max;
|
int min, max;
|
||||||
} const opns[] = {
|
} const opns[] = {
|
||||||
{ 'l', bin_zle_list, 0, -1 },
|
{ 'l', bin_zle_list, 0, -1 },
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ static char *blank_env[] = { NULL };
|
|||||||
|
|
||||||
/* Execution functions. */
|
/* Execution functions. */
|
||||||
|
|
||||||
static int (*execfuncs[WC_COUNT-WC_CURSH]) _((Estate, int)) = {
|
static int (*execfuncs[WC_COUNT-WC_CURSH]) (Estate, int) = {
|
||||||
execcursh, exectime, NULL /* execfuncdef handled specially */,
|
execcursh, exectime, NULL /* execfuncdef handled specially */,
|
||||||
execfor, execselect,
|
execfor, execselect,
|
||||||
execwhile, execrepeat, execcase, execif, execcond,
|
execwhile, execrepeat, execcase, execif, execcond,
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ typedef struct stat *Statptr; /* This makes the Ultrix compiler happy. Go figu
|
|||||||
#define TT_TERABYTES 5
|
#define TT_TERABYTES 5
|
||||||
|
|
||||||
|
|
||||||
typedef int (*TestMatchFunc) _((char *, struct stat *, off_t, char *));
|
typedef int (*TestMatchFunc) (char *, struct stat *, off_t, char *);
|
||||||
|
|
||||||
struct qual {
|
struct qual {
|
||||||
struct qual *next; /* Next qualifier, must match */
|
struct qual *next; /* Next qualifier, must match */
|
||||||
@@ -1264,7 +1264,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
|||||||
int sense, qualsfound;
|
int sense, qualsfound;
|
||||||
off_t data;
|
off_t data;
|
||||||
char *sdata, *newcolonmod, *ptr;
|
char *sdata, *newcolonmod, *ptr;
|
||||||
int (*func) _((char *, Statptr, off_t, char *));
|
int (*func) (char *, Statptr, off_t, char *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise state variables for current file pattern.
|
* Initialise state variables for current file pattern.
|
||||||
@@ -1310,7 +1310,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
|||||||
if (*ptr == Dash)
|
if (*ptr == Dash)
|
||||||
*ptr = '-';
|
*ptr = '-';
|
||||||
while (*s && !newcolonmod) {
|
while (*s && !newcolonmod) {
|
||||||
func = (int (*) _((char *, Statptr, off_t, char *)))0;
|
func = (int (*) (char *, Statptr, off_t, char *)) 0;
|
||||||
if (*s == ',') {
|
if (*s == ',') {
|
||||||
/* A comma separates alternative sets of qualifiers */
|
/* A comma separates alternative sets of qualifiers */
|
||||||
s++;
|
s++;
|
||||||
@@ -1961,7 +1961,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
|||||||
/* Sort arguments in to lexical (and possibly numeric) order. *
|
/* Sort arguments in to lexical (and possibly numeric) order. *
|
||||||
* This is reversed to facilitate insertion into the list. */
|
* This is reversed to facilitate insertion into the list. */
|
||||||
qsort((void *) & matchbuf[0], matchct, sizeof(struct gmatch),
|
qsort((void *) & matchbuf[0], matchct, sizeof(struct gmatch),
|
||||||
(int (*) _((const void *, const void *)))gmatchcmp);
|
(int (*) (const void *, const void *)) gmatchcmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first < 0) {
|
if (first < 0) {
|
||||||
|
|||||||
14
Src/hist.c
14
Src/hist.c
@@ -34,25 +34,25 @@
|
|||||||
* word control. */
|
* word control. */
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
mod_export int (*hgetc) _((void));
|
mod_export int (*hgetc) (void);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*hungetc) _((int));
|
void (*hungetc) (int);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*hwaddc) _((int));
|
void (*hwaddc) (int);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*hwbegin) _((int));
|
void (*hwbegin) (int);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*hwabort) _((void));
|
void (*hwabort) (void);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*hwend) _((void));
|
void (*hwend) (void);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*addtoline) _((int));
|
void (*addtoline) (int);
|
||||||
|
|
||||||
/* != 0 means history substitution is turned off */
|
/* != 0 means history substitution is turned off */
|
||||||
|
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ BEGIN {
|
|||||||
sub(/@-.*$/, "", dnam)
|
sub(/@-.*$/, "", dnam)
|
||||||
|
|
||||||
# Put parens etc. back
|
# Put parens etc. back
|
||||||
gsub(/@[{]/, " _((", dcltor)
|
gsub(/@[{]/, " (", dcltor)
|
||||||
gsub(/@}/, "))", dcltor)
|
gsub(/@}/, ")", dcltor)
|
||||||
gsub(/@</, "(", dcltor)
|
gsub(/@</, "(", dcltor)
|
||||||
gsub(/@>/, ")", dcltor)
|
gsub(/@>/, ")", dcltor)
|
||||||
gsub(/@!/, ",", dcltor)
|
gsub(/@!/, ",", dcltor)
|
||||||
|
|||||||
@@ -1057,17 +1057,17 @@ zrealloc(void *ptr, size_t size)
|
|||||||
#if !defined(__hpux) && !defined(DGUX) && !defined(__osf__)
|
#if !defined(__hpux) && !defined(DGUX) && !defined(__osf__)
|
||||||
# if defined(_BSD)
|
# if defined(_BSD)
|
||||||
# ifndef HAVE_BRK_PROTO
|
# ifndef HAVE_BRK_PROTO
|
||||||
extern int brk _((caddr_t));
|
extern int brk (caddr_t);
|
||||||
# endif
|
# endif
|
||||||
# ifndef HAVE_SBRK_PROTO
|
# ifndef HAVE_SBRK_PROTO
|
||||||
extern caddr_t sbrk _((int));
|
extern caddr_t sbrk (int);
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# ifndef HAVE_BRK_PROTO
|
# ifndef HAVE_BRK_PROTO
|
||||||
extern int brk _((void *));
|
extern int brk (void *);
|
||||||
# endif
|
# endif
|
||||||
# ifndef HAVE_SBRK_PROTO
|
# ifndef HAVE_SBRK_PROTO
|
||||||
extern void *sbrk _((int));
|
extern void *sbrk (int);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -122,12 +122,12 @@ for bin_mod in $bin_mods; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo " {"
|
echo " {"
|
||||||
echo " extern int setup_${q_bin_mod} _((Module));"
|
echo " extern int setup_${q_bin_mod} (Module);"
|
||||||
echo " extern int boot_${q_bin_mod} _((Module));"
|
echo " extern int boot_${q_bin_mod} (Module);"
|
||||||
echo " extern int features_${q_bin_mod} _((Module,char***));"
|
echo " extern int features_${q_bin_mod} (Module,char***);"
|
||||||
echo " extern int enables_${q_bin_mod} _((Module,int**));"
|
echo " extern int enables_${q_bin_mod} (Module,int**);"
|
||||||
echo " extern int cleanup_${q_bin_mod} _((Module));"
|
echo " extern int cleanup_${q_bin_mod} (Module);"
|
||||||
echo " extern int finish_${q_bin_mod} _((Module));"
|
echo " extern int finish_${q_bin_mod} (Module);"
|
||||||
echo
|
echo
|
||||||
echo " register_module(\"$bin_mod\","
|
echo " register_module(\"$bin_mod\","
|
||||||
echo " setup_${q_bin_mod},"
|
echo " setup_${q_bin_mod},"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "zsh.mdh"
|
#include "zsh.mdh"
|
||||||
|
|
||||||
int setup_ _((Module));
|
int setup_ (Module);
|
||||||
int boot_ _((Module));
|
int boot_ (Module);
|
||||||
int cleanup_ _((Module));
|
int cleanup_ (Module);
|
||||||
int finish_ _((Module));
|
int finish_ (Module);
|
||||||
int modentry _((int boot, Module m, void *ptr));
|
int modentry (int boot, Module m, void *ptr);
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -2392,7 +2392,7 @@ par_nl_wordlist(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
void (*condlex) _((void)) = zshlex;
|
void (*condlex) (void) = zshlex;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cond : cond_1 { SEPER } [ DBAR { SEPER } cond ]
|
* cond : cond_1 { SEPER } [ DBAR { SEPER } cond ]
|
||||||
|
|||||||
@@ -28,9 +28,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HAVE_STDLIB_H
|
#ifndef HAVE_STDLIB_H
|
||||||
char *malloc _((size_t));
|
char *malloc (size_t);
|
||||||
char *realloc _((void *, size_t));
|
char *realloc (void *, size_t);
|
||||||
char *calloc _((size_t, size_t));
|
char *calloc (size_t, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
|
#if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
|
||||||
@@ -45,11 +45,11 @@ char *calloc _((size_t, size_t));
|
|||||||
#else
|
#else
|
||||||
#define TC_CONST
|
#define TC_CONST
|
||||||
#endif
|
#endif
|
||||||
extern int tgetent _((char *bp, TC_CONST char *name));
|
extern int tgetent (char *bp, TC_CONST char *name);
|
||||||
extern int tgetnum _((char *id));
|
extern int tgetnum (char *id);
|
||||||
extern int tgetflag _((char *id));
|
extern int tgetflag (char *id);
|
||||||
extern char *tgetstr _((char *id, char **area));
|
extern char *tgetstr (char *id, char **area);
|
||||||
extern int tputs _((TC_CONST char *cp, int affcnt, int (*outc) (int)));
|
extern int tputs (TC_CONST char *cp, int affcnt, int (*outc) (int));
|
||||||
#undef TC_CONST
|
#undef TC_CONST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -70,30 +70,30 @@ char *tgoto(const char *cap, int col, int row);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __osf__
|
#ifdef __osf__
|
||||||
char *mktemp _((char *));
|
char *mktemp (char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__osf__) && defined(__alpha) && defined(__GNUC__)
|
#if defined(__osf__) && defined(__alpha) && defined(__GNUC__)
|
||||||
/* Digital cc does not need these prototypes, gcc does need them */
|
/* Digital cc does not need these prototypes, gcc does need them */
|
||||||
# ifndef HAVE_IOCTL_PROTO
|
# ifndef HAVE_IOCTL_PROTO
|
||||||
int ioctl _((int d, unsigned long request, void *argp));
|
int ioctl (int d, unsigned long request, void *argp);
|
||||||
# endif
|
# endif
|
||||||
# ifndef HAVE_MKNOD_PROTO
|
# ifndef HAVE_MKNOD_PROTO
|
||||||
int mknod _((const char *pathname, int mode, dev_t device));
|
int mknod (const char *pathname, int mode, dev_t device);
|
||||||
# endif
|
# endif
|
||||||
int nice _((int increment));
|
int nice (int increment);
|
||||||
int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
|
int select (int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DGUX) && defined(__STDC__)
|
#if defined(DGUX) && defined(__STDC__)
|
||||||
/* Just plain missing. */
|
/* Just plain missing. */
|
||||||
extern int getrlimit _((int resource, struct rlimit *rlp));
|
extern int getrlimit (int resource, struct rlimit *rlp);
|
||||||
extern int setrlimit _((int resource, const struct rlimit *rlp));
|
extern int setrlimit (int resource, const struct rlimit *rlp);
|
||||||
extern int getrusage _((int who, struct rusage *rusage));
|
extern int getrusage (int who, struct rusage *rusage);
|
||||||
extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
|
extern int gettimeofday (struct timeval *tv, struct timezone *tz);
|
||||||
extern int wait3 _((union wait *wait_status, int options, struct rusage *rusage));
|
extern int wait3 (union wait *wait_status, int options, struct rusage *rusage);
|
||||||
extern int getdomainname _((char *name, int maxlength));
|
extern int getdomainname (char *name, int maxlength);
|
||||||
extern int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
|
extern int select (int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout);
|
||||||
#endif /* DGUX and __STDC__ */
|
#endif /* DGUX and __STDC__ */
|
||||||
|
|
||||||
#ifdef __NeXT__
|
#ifdef __NeXT__
|
||||||
@@ -101,34 +101,34 @@ extern pid_t getppid(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__sun__) && !defined(__SVR4) /* SunOS */
|
#if defined(__sun__) && !defined(__SVR4) /* SunOS */
|
||||||
extern char *strerror _((int errnum));
|
extern char *strerror (int errnum);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
/*** prototypes for functions built in compat.c ***/
|
/*** prototypes for functions built in compat.c ***/
|
||||||
#ifndef HAVE_STRSTR
|
#ifndef HAVE_STRSTR
|
||||||
extern char *strstr _((const char *s, const char *t));
|
extern char *strstr (const char *s, const char *t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETHOSTNAME
|
#ifndef HAVE_GETHOSTNAME
|
||||||
extern int gethostname _((char *name, size_t namelen));
|
extern int gethostname (char *name, size_t namelen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETTIMEOFDAY
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
extern int gettimeofday _((struct timeval *tv, struct timezone *tz));
|
extern int gettimeofday (struct timeval *tv, struct timezone *tz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_DIFFTIME
|
#ifndef HAVE_DIFFTIME
|
||||||
extern double difftime _((time_t t2, time_t t1));
|
extern double difftime (time_t t2, time_t t1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
#ifndef HAVE_STRERROR
|
||||||
extern char *strerror _((int errnum));
|
extern char *strerror (int errnum);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*** end of prototypes for functions in compat.c ***/
|
/*** end of prototypes for functions in compat.c ***/
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
extern void bcopy _((const void *, void *, size_t));
|
extern void bcopy (const void *, void *, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SIGNAL_HANDTYPE void (*)_((int))
|
#define SIGNAL_HANDTYPE void (*)(int)
|
||||||
|
|
||||||
#ifndef HAVE_KILLPG
|
#ifndef HAVE_KILLPG
|
||||||
# define killpg(pgrp,sig) kill(-(pgrp),sig)
|
# define killpg(pgrp,sig) kill(-(pgrp),sig)
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
#ifdef BSD_SIGNALS
|
#ifdef BSD_SIGNALS
|
||||||
#define signal_block(S) sigblock(S)
|
#define signal_block(S) sigblock(S)
|
||||||
#else
|
#else
|
||||||
extern sigset_t signal_block _((sigset_t));
|
extern sigset_t signal_block (sigset_t);
|
||||||
#endif /* BSD_SIGNALS */
|
#endif /* BSD_SIGNALS */
|
||||||
|
|
||||||
extern sigset_t signal_unblock _((sigset_t));
|
extern sigset_t signal_unblock (sigset_t);
|
||||||
|
|||||||
@@ -5277,6 +5277,7 @@ nicedupstring(char const *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**/
|
||||||
#ifndef MULTIBYTE_SUPPORT
|
#ifndef MULTIBYTE_SUPPORT
|
||||||
/* Unmetafy and output a string, displaying special characters readably. */
|
/* Unmetafy and output a string, displaying special characters readably. */
|
||||||
|
|
||||||
@@ -5311,8 +5312,9 @@ niceztrlen(char const *s)
|
|||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/**/
|
||||||
|
#endif
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
#ifdef MULTIBYTE_SUPPORT
|
#ifdef MULTIBYTE_SUPPORT
|
||||||
@@ -7633,6 +7635,7 @@ mode_to_octal(mode_t mode)
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
#ifdef MAILDIR_SUPPORT
|
#ifdef MAILDIR_SUPPORT
|
||||||
/*
|
/*
|
||||||
* Stat a file. If it's a maildir, check all messages
|
* Stat a file. If it's a maildir, check all messages
|
||||||
@@ -7756,4 +7759,6 @@ mailstat(char *path, struct stat *st)
|
|||||||
*st = st_ret_last = st_ret;
|
*st = st_ret_last = st_ret;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
92
Src/zsh.h
92
Src/zsh.h
@@ -618,7 +618,7 @@ union linkroot {
|
|||||||
/* Specific elements of linked lists */
|
/* Specific elements of linked lists */
|
||||||
/*************************************/
|
/*************************************/
|
||||||
|
|
||||||
typedef void (*voidvoidfnptr_t) _((void));
|
typedef void (*voidvoidfnptr_t) (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Element of the prepromptfns list.
|
* Element of the prepromptfns list.
|
||||||
@@ -678,7 +678,7 @@ struct timedfn {
|
|||||||
#define COND_MOD 18
|
#define COND_MOD 18
|
||||||
#define COND_MODI 19
|
#define COND_MODI 19
|
||||||
|
|
||||||
typedef int (*CondHandler) _((char **, int));
|
typedef int (*CondHandler) (char **, int);
|
||||||
|
|
||||||
struct conddef {
|
struct conddef {
|
||||||
Conddef next; /* next in list */
|
Conddef next; /* next in list */
|
||||||
@@ -1164,28 +1164,28 @@ struct dirsav {
|
|||||||
/* Definitions for Hash Tables */
|
/* Definitions for Hash Tables */
|
||||||
/*******************************/
|
/*******************************/
|
||||||
|
|
||||||
typedef void *(*VFunc) _((void *));
|
typedef void *(*VFunc) (void *);
|
||||||
typedef void (*FreeFunc) _((void *));
|
typedef void (*FreeFunc) (void *);
|
||||||
|
|
||||||
typedef unsigned (*HashFunc) _((const char *));
|
typedef unsigned (*HashFunc) (const char *);
|
||||||
typedef void (*TableFunc) _((HashTable));
|
typedef void (*TableFunc) (HashTable);
|
||||||
/*
|
/*
|
||||||
* Note that this is deliberately "char *", not "const char *",
|
* Note that this is deliberately "char *", not "const char *",
|
||||||
* since the AddNodeFunc is passed a pointer to a string that
|
* since the AddNodeFunc is passed a pointer to a string that
|
||||||
* will be stored and later freed.
|
* will be stored and later freed.
|
||||||
*/
|
*/
|
||||||
typedef void (*AddNodeFunc) _((HashTable, char *, void *));
|
typedef void (*AddNodeFunc) (HashTable, char *, void *);
|
||||||
typedef HashNode (*GetNodeFunc) _((HashTable, const char *));
|
typedef HashNode (*GetNodeFunc) (HashTable, const char *);
|
||||||
typedef HashNode (*RemoveNodeFunc) _((HashTable, const char *));
|
typedef HashNode (*RemoveNodeFunc) (HashTable, const char *);
|
||||||
typedef void (*FreeNodeFunc) _((HashNode));
|
typedef void (*FreeNodeFunc) (HashNode);
|
||||||
typedef int (*CompareFunc) _((const char *, const char *));
|
typedef int (*CompareFunc) (const char *, const char *);
|
||||||
|
|
||||||
/* type of function that is passed to *
|
/* type of function that is passed to *
|
||||||
* scanhashtable or scanmatchtable */
|
* scanhashtable or scanmatchtable */
|
||||||
typedef void (*ScanFunc) _((HashNode, int));
|
typedef void (*ScanFunc) (HashNode, int);
|
||||||
typedef void (*ScanTabFunc) _((HashTable, ScanFunc, int));
|
typedef void (*ScanTabFunc) (HashTable, ScanFunc, int);
|
||||||
|
|
||||||
typedef void (*PrintTableStats) _((HashTable));
|
typedef void (*PrintTableStats) (HashTable);
|
||||||
|
|
||||||
/* Hash table for standard open hashing. Instances of struct hashtable can be *
|
/* Hash table for standard open hashing. Instances of struct hashtable can be *
|
||||||
* created only by newhashtable(). In fact, this function creates an instance *
|
* created only by newhashtable(). In fact, this function creates an instance *
|
||||||
@@ -1352,7 +1352,7 @@ struct funcstack {
|
|||||||
|
|
||||||
/* node in list of function call wrappers */
|
/* node in list of function call wrappers */
|
||||||
|
|
||||||
typedef int (*WrapFunc) _((Eprog, FuncWrap, char *));
|
typedef int (*WrapFunc) (Eprog, FuncWrap, char *);
|
||||||
|
|
||||||
struct funcwrap {
|
struct funcwrap {
|
||||||
FuncWrap next;
|
FuncWrap next;
|
||||||
@@ -1428,8 +1428,8 @@ enum {
|
|||||||
* builtin structure.
|
* builtin structure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef int (*HandlerFunc) _((char *, char **, Options, int));
|
typedef int (*HandlerFunc) (char *, char **, Options, int);
|
||||||
typedef int (*HandlerFuncAssign) _((char *, char **, LinkList, Options, int));
|
typedef int (*HandlerFuncAssign) (char *, char **, LinkList, Options, int);
|
||||||
#define NULLBINCMD ((HandlerFunc) 0)
|
#define NULLBINCMD ((HandlerFunc) 0)
|
||||||
|
|
||||||
struct builtin {
|
struct builtin {
|
||||||
@@ -1526,10 +1526,10 @@ struct module {
|
|||||||
/* Module record is an alias */
|
/* Module record is an alias */
|
||||||
#define MOD_ALIAS (1<<6)
|
#define MOD_ALIAS (1<<6)
|
||||||
|
|
||||||
typedef int (*Module_generic_func) _((void));
|
typedef int (*Module_generic_func) (void);
|
||||||
typedef int (*Module_void_func) _((Module));
|
typedef int (*Module_void_func) (Module);
|
||||||
typedef int (*Module_features_func) _((Module, char ***));
|
typedef int (*Module_features_func) (Module, char ***);
|
||||||
typedef int (*Module_enables_func) _((Module, int **));
|
typedef int (*Module_enables_func) (Module, int **);
|
||||||
|
|
||||||
struct linkedmod {
|
struct linkedmod {
|
||||||
char *name;
|
char *name;
|
||||||
@@ -1574,7 +1574,7 @@ struct feature_enables {
|
|||||||
|
|
||||||
/* C-function hooks */
|
/* C-function hooks */
|
||||||
|
|
||||||
typedef int (*Hookfn) _((Hookdef, void *));
|
typedef int (*Hookfn) (Hookdef, void *);
|
||||||
|
|
||||||
struct hookdef {
|
struct hookdef {
|
||||||
Hookdef next;
|
Hookdef next;
|
||||||
@@ -1789,33 +1789,33 @@ typedef const struct gsu_array *GsuArray;
|
|||||||
typedef const struct gsu_hash *GsuHash;
|
typedef const struct gsu_hash *GsuHash;
|
||||||
|
|
||||||
struct gsu_scalar {
|
struct gsu_scalar {
|
||||||
char *(*getfn) _((Param));
|
char *(*getfn) (Param);
|
||||||
void (*setfn) _((Param, char *));
|
void (*setfn) (Param, char *);
|
||||||
void (*unsetfn) _((Param, int));
|
void (*unsetfn) (Param, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gsu_integer {
|
struct gsu_integer {
|
||||||
zlong (*getfn) _((Param));
|
zlong (*getfn) (Param);
|
||||||
void (*setfn) _((Param, zlong));
|
void (*setfn) (Param, zlong);
|
||||||
void (*unsetfn) _((Param, int));
|
void (*unsetfn) (Param, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gsu_float {
|
struct gsu_float {
|
||||||
double (*getfn) _((Param));
|
double (*getfn) (Param);
|
||||||
void (*setfn) _((Param, double));
|
void (*setfn) (Param, double);
|
||||||
void (*unsetfn) _((Param, int));
|
void (*unsetfn) (Param, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gsu_array {
|
struct gsu_array {
|
||||||
char **(*getfn) _((Param));
|
char **(*getfn) (Param);
|
||||||
void (*setfn) _((Param, char **));
|
void (*setfn) (Param, char **);
|
||||||
void (*unsetfn) _((Param, int));
|
void (*unsetfn) (Param, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gsu_hash {
|
struct gsu_hash {
|
||||||
HashTable (*getfn) _((Param));
|
HashTable (*getfn) (Param);
|
||||||
void (*setfn) _((Param, HashTable));
|
void (*setfn) (Param, HashTable);
|
||||||
void (*unsetfn) _((Param, int));
|
void (*unsetfn) (Param, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -2984,7 +2984,7 @@ enum errflag_bits {
|
|||||||
/* Sorting */
|
/* Sorting */
|
||||||
/***********/
|
/***********/
|
||||||
|
|
||||||
typedef int (*CompareFn) _((const void *, const void *));
|
typedef int (*CompareFn) (const void *, const void *);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SORTIT_ANYOLDHOW = 0, /* Defaults */
|
SORTIT_ANYOLDHOW = 0, /* Defaults */
|
||||||
@@ -3042,13 +3042,13 @@ struct hist_stack {
|
|||||||
short *chwords;
|
short *chwords;
|
||||||
int chwordlen;
|
int chwordlen;
|
||||||
int chwordpos;
|
int chwordpos;
|
||||||
int (*hgetc) _((void));
|
int (*hgetc) (void);
|
||||||
void (*hungetc) _((int));
|
void (*hungetc) (int);
|
||||||
void (*hwaddc) _((int));
|
void (*hwaddc) (int);
|
||||||
void (*hwbegin) _((int));
|
void (*hwbegin) (int);
|
||||||
void (*hwabort) _((void));
|
void (*hwabort) (void);
|
||||||
void (*hwend) _((void));
|
void (*hwend) (void);
|
||||||
void (*addtoline) _((int));
|
void (*addtoline) (int);
|
||||||
unsigned char *cstack;
|
unsigned char *cstack;
|
||||||
int csp;
|
int csp;
|
||||||
int hist_keep_comment;
|
int hist_keep_comment;
|
||||||
@@ -3218,7 +3218,7 @@ enum {
|
|||||||
|
|
||||||
/* compctl entry point pointers */
|
/* compctl entry point pointers */
|
||||||
|
|
||||||
typedef int (*CompctlReadFn) _((char *, char **, Options, char *));
|
typedef int (*CompctlReadFn) (char *, char **, Options, char *);
|
||||||
|
|
||||||
/* ZLE entry point pointer */
|
/* ZLE entry point pointer */
|
||||||
|
|
||||||
|
|||||||
@@ -82,12 +82,6 @@
|
|||||||
*/
|
*/
|
||||||
#define _STRPTIME_DONTZERO
|
#define _STRPTIME_DONTZERO
|
||||||
|
|
||||||
#ifdef PROTOTYPES
|
|
||||||
# define _(Args) Args
|
|
||||||
#else
|
|
||||||
# define _(Args) ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_ALLOCA
|
#ifndef HAVE_ALLOCA
|
||||||
# define alloca zhalloc
|
# define alloca zhalloc
|
||||||
#else
|
#else
|
||||||
@@ -101,7 +95,7 @@
|
|||||||
# pragma alloca
|
# pragma alloca
|
||||||
# else
|
# else
|
||||||
# ifndef alloca
|
# ifndef alloca
|
||||||
char *alloca _((size_t));
|
char *alloca (size_t);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
50
aclocal.m4
vendored
50
aclocal.m4
vendored
@@ -2,56 +2,6 @@
|
|||||||
# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
|
# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
|
||||||
# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
|
# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
|
||||||
|
|
||||||
# @defmac fp_PROG_CC_STDC
|
|
||||||
# @maindex PROG_CC_STDC
|
|
||||||
# @ovindex CC
|
|
||||||
# If the C compiler in not in ANSI C mode by default, try to add an option
|
|
||||||
# to output variable @code{CC} to make it so. This macro tries various
|
|
||||||
# options that select ANSI C on some system or another. It considers the
|
|
||||||
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
|
|
||||||
# handles function prototypes correctly.
|
|
||||||
#
|
|
||||||
# If you use this macro, you should check after calling it whether the C
|
|
||||||
# compiler has been set to accept ANSI C; if not, the shell variable
|
|
||||||
# @code{fp_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
|
||||||
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
|
||||||
# program @code{ansi2knr}, which comes with Ghostscript.
|
|
||||||
# @end defmac
|
|
||||||
|
|
||||||
define(fp_PROG_CC_STDC,
|
|
||||||
[AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C,
|
|
||||||
fp_cv_prog_cc_stdc,
|
|
||||||
[fp_cv_prog_cc_stdc=no
|
|
||||||
ac_save_CFLAGS="$CFLAGS"
|
|
||||||
# Don't try gcc -ansi; that turns off useful extensions and
|
|
||||||
# breaks some systems' header files.
|
|
||||||
# AIX -qlanglvl=ansi
|
|
||||||
# Ultrix and OSF/1 -std1
|
|
||||||
# HP-UX -Ae or -Aa -D_HPUX_SOURCE
|
|
||||||
# SVR4 -Xc
|
|
||||||
# For HP-UX, we try -Ae first; this turns on ANSI but also extensions,
|
|
||||||
# as well as defining _HPUX_SOURCE, and we can then use long long.
|
|
||||||
# We keep the old version for backward compatibility.
|
|
||||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" -Xc
|
|
||||||
do
|
|
||||||
CFLAGS="$ac_save_CFLAGS $ac_arg"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
||||||
[#ifndef __STDC__
|
|
||||||
choke me
|
|
||||||
#endif
|
|
||||||
]], [[int test (int i, double x);
|
|
||||||
struct s1 {int (*f) (int a);};
|
|
||||||
struct s2 {int (*f) (double a);};]])],
|
|
||||||
[fp_cv_prog_cc_stdc="$ac_arg"; break],[])
|
|
||||||
done
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
|
||||||
])
|
|
||||||
case "x$fp_cv_prog_cc_stdc" in
|
|
||||||
x|xno) ;;
|
|
||||||
*) CC="$CC $fp_cv_prog_cc_stdc" ;;
|
|
||||||
esac
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN(AC_PROG_LN,
|
AC_DEFUN(AC_PROG_LN,
|
||||||
[AC_MSG_CHECKING(whether ln works)
|
[AC_MSG_CHECKING(whether ln works)
|
||||||
AC_CACHE_VAL(ac_cv_prog_LN,
|
AC_CACHE_VAL(ac_cv_prog_LN,
|
||||||
|
|||||||
41
configure.ac
41
configure.ac
@@ -273,11 +273,6 @@ fi],
|
|||||||
AC_DEFINE(CONFIG_LOCALE)
|
AC_DEFINE(CONFIG_LOCALE)
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Do you want to compile as K&R C.
|
|
||||||
AC_ARG_ENABLE(ansi2knr,
|
|
||||||
AS_HELP_STRING([--enable-ansi2knr],[translate source to K&R C before compiling]),
|
|
||||||
[ansi2knr="$enableval"], [ansi2knr=default])
|
|
||||||
|
|
||||||
ifdef([runhelpdir],[undefine([runhelpdir])])dnl
|
ifdef([runhelpdir],[undefine([runhelpdir])])dnl
|
||||||
AC_ARG_ENABLE(runhelpdir,
|
AC_ARG_ENABLE(runhelpdir,
|
||||||
AS_HELP_STRING([--enable-runhelpdir=DIR],[the directory in which to install run-help files]),
|
AS_HELP_STRING([--enable-runhelpdir=DIR],[the directory in which to install run-help files]),
|
||||||
@@ -483,7 +478,7 @@ fi
|
|||||||
dnl if the user hasn't specified CFLAGS, then
|
dnl if the user hasn't specified CFLAGS, then
|
||||||
dnl if compiler is gcc, then use -O2 and some warning flags
|
dnl if compiler is gcc, then use -O2 and some warning flags
|
||||||
dnl else use -O
|
dnl else use -O
|
||||||
if test -n "$auto_cflags" && test ."$ansi2knr" != .yes; then
|
if test -n "$auto_cflags"; then
|
||||||
if test "${enable_zsh_debug}" = yes; then
|
if test "${enable_zsh_debug}" = yes; then
|
||||||
if test -n "$GCC"; then
|
if test -n "$GCC"; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -ggdb"
|
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -ggdb"
|
||||||
@@ -558,28 +553,6 @@ case "$host_os" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
fp_PROG_CC_STDC
|
fp_PROG_CC_STDC
|
||||||
AC_MSG_CHECKING([whether to use prototypes])
|
|
||||||
if test ."$ansi2knr" = .yes || test ."$ansi2knr" = .no; then
|
|
||||||
msg="(overridden) "
|
|
||||||
else
|
|
||||||
msg=
|
|
||||||
if test ."$fp_cv_prog_cc_stdc" = .no; then
|
|
||||||
ansi2knr=yes
|
|
||||||
else
|
|
||||||
ansi2knr=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AH_TEMPLATE([PROTOTYPES],
|
|
||||||
[Define to 1 if ANSI function prototypes are usable.])
|
|
||||||
if test "$ansi2knr" = yes; then
|
|
||||||
AC_MSG_RESULT(${msg}no)
|
|
||||||
U=_
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(${msg}yes)
|
|
||||||
AC_DEFINE(PROTOTYPES)
|
|
||||||
U=
|
|
||||||
fi
|
|
||||||
AC_SUBST(U)
|
|
||||||
|
|
||||||
AC_FUNC_ALLOCA dnl Check how to get `alloca'.
|
AC_FUNC_ALLOCA dnl Check how to get `alloca'.
|
||||||
|
|
||||||
@@ -647,18 +620,6 @@ case "$LC_PAPER" in
|
|||||||
esac
|
esac
|
||||||
AC_SUBST(PAPERSIZE)
|
AC_SUBST(PAPERSIZE)
|
||||||
|
|
||||||
AC_CHECK_PROGS([ANSI2KNR], [ansi2knr], [: ansi2knr])
|
|
||||||
|
|
||||||
if test x"$ansi2knr" = xyes && test x"$ANSI2KNR" = x": ansi2knr"; then
|
|
||||||
echo "----------"
|
|
||||||
echo "configure fatal error:"
|
|
||||||
echo "ansi2knr was specified (--enable-ansi2knr) but the program could not be found."
|
|
||||||
echo "Either remove the configure option if it is not required or build the ansi2knr"
|
|
||||||
echo "program before reconfiguring Zsh. The source code for ansi2knr is also"
|
|
||||||
echo "available in the GPL directory on Zsh distribution sites."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ------------------
|
dnl ------------------
|
||||||
dnl CHECK HEADER FILES
|
dnl CHECK HEADER FILES
|
||||||
dnl ------------------
|
dnl ------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user