mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-28 06:03:06 +02:00
more ANSI/ISO C changes; start on converting the unwind-protect framework to ANSI C
This commit is contained in:
@@ -57,11 +57,7 @@ long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif /* CRAY && CRAY_STACKSEG_END */
|
||||
|
||||
#if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
typedef char *pointer;
|
||||
#endif
|
||||
|
||||
#define NULL 0
|
||||
|
||||
|
||||
+1
-13
@@ -39,11 +39,7 @@
|
||||
|
||||
/* Generic pointer type. */
|
||||
#ifndef PTR_T
|
||||
# if defined (__STDC__)
|
||||
# define PTR_T void *
|
||||
# else
|
||||
# define PTR_T char *
|
||||
# endif
|
||||
# define PTR_T void *
|
||||
#endif
|
||||
|
||||
#if !defined (NULL)
|
||||
@@ -72,14 +68,6 @@
|
||||
# endif /* HAVE_BCOPY */
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#if !defined (PARAMS)
|
||||
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
|
||||
# define PARAMS(protos) protos
|
||||
# else
|
||||
# define PARAMS(protos) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Use Duff's device for good zeroing/copying performance. DO NOT call the
|
||||
Duff's device macros with NBYTES == 0. */
|
||||
|
||||
|
||||
+3
-3
@@ -387,7 +387,7 @@ xbotch (PTR_T mem, int e, const char *s, const char *file, int line)
|
||||
assumed to not be busy; the caller (morecore()) checks for this.
|
||||
BUSY[NU] must be set to 1. */
|
||||
static void
|
||||
bcoalesce (register int nu)
|
||||
bcoalesce (int nu)
|
||||
{
|
||||
register union mhead *mp, *mp1, *mp2;
|
||||
register int nbuck;
|
||||
@@ -455,7 +455,7 @@ bcoalesce (register int nu)
|
||||
is assumed to be empty. Must be called with signals blocked (e.g.,
|
||||
by morecore()). BUSY[NU] must be set to 1. */
|
||||
static void
|
||||
bsplit (register int nu)
|
||||
bsplit (int nu)
|
||||
{
|
||||
register union mhead *mp;
|
||||
int nbuck, nblks, split_max;
|
||||
@@ -616,7 +616,7 @@ morecore (int nu)
|
||||
sigset_t set, oset;
|
||||
int blocked_sigs;
|
||||
|
||||
/* Block all signals in case we are executed from a signal handler. */
|
||||
/* Block signals in case we are executed from a signal handler. */
|
||||
blocked_sigs = 0;
|
||||
#ifdef SHELL
|
||||
# if defined (SIGCHLD)
|
||||
|
||||
@@ -24,16 +24,9 @@
|
||||
|
||||
/* Generic pointer type. */
|
||||
#ifndef PTR_T
|
||||
|
||||
#if defined (__STDC__)
|
||||
# define PTR_T void *
|
||||
#else
|
||||
# define PTR_T char *
|
||||
#endif
|
||||
|
||||
#endif /* PTR_T */
|
||||
|
||||
|
||||
extern PTR_T sh_malloc (size_t, const char *, int);
|
||||
extern PTR_T sh_realloc (PTR_T, size_t, const char *, int);
|
||||
extern void sh_free (PTR_T, const char *, int);
|
||||
|
||||
@@ -33,13 +33,7 @@
|
||||
|
||||
/* Generic pointer type. */
|
||||
#ifndef PTR_T
|
||||
|
||||
#if defined (__STDC__)
|
||||
# define PTR_T void *
|
||||
#else
|
||||
# define PTR_T char *
|
||||
#endif
|
||||
|
||||
#endif /* PTR_T */
|
||||
|
||||
/* **************************************************************** */
|
||||
|
||||
Reference in New Issue
Block a user