Skip to content

Commit

Permalink
ansification: remove _VOID
Browse files Browse the repository at this point in the history
Signed-off-by: Yaakov Selkowitz <[email protected]>
  • Loading branch information
yselkowitz committed Jan 17, 2018
1 parent fff27f8 commit 67ee0ca
Show file tree
Hide file tree
Showing 41 changed files with 104 additions and 106 deletions.
2 changes: 1 addition & 1 deletion libgloss/bfin/_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <_ansi.h>

_VOID
void
_DEFUN (_exit, (rc),
int rc)
{
Expand Down
2 changes: 1 addition & 1 deletion libgloss/libnosys/_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <_ansi.h>
#include <_syslist.h>

_VOID
void
_DEFUN (_exit, (rc),
int rc)
{
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/iconv/lib/conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ typedef struct
* If 'direction' is 0, "from" encoding is tested, else
* "to" encoding is tested.
*/
_VOID _EXFNPTR(get_state, (void *data,
void _EXFNPTR(get_state, (void *data,
mbstate_t *state,
int direction));

Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/iconv/lib/iconvnls.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ _DEFUN(_iconv_nls_conv, (rptr, cd, inbuf, inbytesleft, outbuf, outbytesleft),
* shift state if 'direction' is 0 and "to" encodings's shift state
* if 'direction' isn't 0.
*/
_VOID
void
_DEFUN(_iconv_nls_get_state, (cd, ps, direction),
iconv_t cd,
mbstate_t *ps,
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/iconv/lib/nullconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ _DEFUN(null_conversion_get_mb_cur_max, (data, direction),
}


static _VOID
static void
_DEFUN(null_conversion_get_state, (data, state, size),
void *data,
mbstate_t *state,
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/iconv/lib/ucsconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ _DEFUN(ucs_based_conversion_get_mb_cur_max, (data, direction),
}


static _VOID
static void
_DEFUN(ucs_based_conversion_get_state, (data, state, direction),
void *data,
mbstate_t *state,
Expand Down
4 changes: 2 additions & 2 deletions newlib/libc/iconv/lib/ucsconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef struct
* DESCRIPTION:
* Returns encoding's current shift sequence.
*/
_VOID _EXFNPTR(get_state, (void *data,
void _EXFNPTR(get_state, (void *data,
mbstate_t *state));

/*
Expand Down Expand Up @@ -183,7 +183,7 @@ typedef struct
int _EXFNPTR(get_mb_cur_max, (void *data));

/* Same as in iconv_to_ucs_ces_handlers_t */
_VOID _EXFNPTR(get_state, (void *data,
void _EXFNPTR(get_state, (void *data,
mbstate_t *state));

/* Same as in iconv_to_ucs_ces_handlers_t */
Expand Down
2 changes: 0 additions & 2 deletions newlib/libc/include/_ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#ifdef _HAVE_STDC
#define _VOLATILE volatile
#define _SIGNED signed
#define _VOID void
#ifdef __CYGWIN__
#define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW
#define _EXFUN(name, proto) __cdecl name proto
Expand All @@ -68,7 +67,6 @@
#else
#define _VOLATILE
#define _SIGNED
#define _VOID void
#define _EXFUN(name, proto) name()
#define _EXFUN_NOTHROW(name, proto) name()
#define _DEFUN(name, arglist, args) name arglist args;
Expand Down
8 changes: 4 additions & 4 deletions newlib/libc/include/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ extern void *malloc (size_t);
extern void *_malloc_r (struct _reent *, size_t);
#endif

extern _VOID free (void *);
extern void free (void *);
#ifdef __CYGWIN__
#undef _free_r
#define _free_r(r, p) free (p)
#else
extern _VOID _free_r (struct _reent *, void *);
extern void _free_r (struct _reent *, void *);
#endif

extern void *realloc (void *, size_t);
Expand Down Expand Up @@ -135,12 +135,12 @@ extern int _malloc_trim_r (struct _reent *, size_t);

/* A compatibility routine for an earlier version of the allocator. */

extern _VOID mstats (char *);
extern void mstats (char *);
#ifdef __CYGWIN__
#undef _mstats_r
#define _mstats_r(r, p) mstats (p)
#else
extern _VOID _mstats_r (struct _reent *, char *);
extern void _mstats_r (struct _reent *, char *);
#endif

/* SVID2/XPG mallopt options */
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ off_t _EXFUN(ftello, ( FILE *));
#endif
#endif
#if __GNU_VISIBLE
int _EXFUN(fcloseall, (_VOID));
int _EXFUN(fcloseall, (void));
#endif
#ifndef _REENT_ONLY
#if __ISO_C_VISIBLE >= 1999
Expand Down
54 changes: 27 additions & 27 deletions newlib/libc/include/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ typedef int (*__compar_fn_t) (const void *, const void *);

#define RAND_MAX __RAND_MAX

int _EXFUN(__locale_mb_cur_max,(_VOID));
int _EXFUN(__locale_mb_cur_max,(void));

#define MB_CUR_MAX __locale_mb_cur_max()

_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__)));
void _EXFUN(abort,(void) _ATTRIBUTE ((__noreturn__)));
int _EXFUN(abs,(int));
#if __BSD_VISIBLE
__uint32_t _EXFUN(arc4random, (void));
__uint32_t _EXFUN(arc4random_uniform, (__uint32_t));
void _EXFUN(arc4random_buf, (void *, size_t));
#endif
int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
int _EXFUN(atexit,(void (*__func)(void)));
double _EXFUN(atof,(const char *__nptr));
#if __MISC_VISIBLE
float _EXFUN(atoff,(const char *__nptr));
Expand All @@ -89,8 +89,8 @@ void * _EXFUN(bsearch,(const void *__key,
__compar_fn_t _compar));
void * _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
div_t _EXFUN(div,(int __numer, int __denom));
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__)));
_VOID _EXFUN_NOTHROW(free,(void *));
void _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__)));
void _EXFUN_NOTHROW(free,(void *));
char * _EXFUN(getenv,(const char *__string));
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
char * _EXFUN(_findenv,(const char *, int *));
Expand Down Expand Up @@ -136,8 +136,8 @@ int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int));
int _EXFUN(_mkstemp_r, (struct _reent *, char *));
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int));
char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
_VOID _EXFUN(qsort,(void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
int _EXFUN(rand,(_VOID));
void _EXFUN(qsort,(void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
int _EXFUN(rand,(void));
void * _EXFUN_NOTHROW(realloc,(void *__r, size_t __size));
#if __BSD_VISIBLE
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
Expand All @@ -151,9 +151,9 @@ char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_
int _EXFUN(rpmatch, (const char *response));
#endif
#if __XSI_VISIBLE
_VOID _EXFUN(setkey, (const char *__key));
void _EXFUN(setkey, (const char *__key));
#endif
_VOID _EXFUN(srand,(unsigned __seed));
void _EXFUN(srand,(unsigned __seed));
double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR));
double _EXFUN(_strtod_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR));
#if __ISO_C_VISIBLE >= 1999
Expand Down Expand Up @@ -193,10 +193,10 @@ char * _EXFUN(l64a,(long __input));
char * _EXFUN(_l64a_r,(struct _reent *,long __input));
#endif
#if __MISC_VISIBLE
int _EXFUN(on_exit,(_VOID (*__func)(int, void *),void *__arg));
int _EXFUN(on_exit,(void (*__func)(int, void *),void *__arg));
#endif
#if __ISO_C_VISIBLE >= 1999
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
void _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
#endif
#if __SVID_VISIBLE || __XSI_VISIBLE
int _EXFUN(putenv,(char *__string));
Expand Down Expand Up @@ -229,32 +229,32 @@ int _EXFUN(rand_r,(unsigned *__seed));
#endif

#if __SVID_VISIBLE || __XSI_VISIBLE
double _EXFUN(drand48,(_VOID));
double _EXFUN(drand48,(void));
double _EXFUN(_drand48_r,(struct _reent *));
double _EXFUN(erand48,(unsigned short [3]));
double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3]));
long _EXFUN(jrand48,(unsigned short [3]));
long _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3]));
_VOID _EXFUN(lcong48,(unsigned short [7]));
_VOID _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7]));
long _EXFUN(lrand48,(_VOID));
void _EXFUN(lcong48,(unsigned short [7]));
void _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7]));
long _EXFUN(lrand48,(void));
long _EXFUN(_lrand48_r,(struct _reent *));
long _EXFUN(mrand48,(_VOID));
long _EXFUN(mrand48,(void));
long _EXFUN(_mrand48_r,(struct _reent *));
long _EXFUN(nrand48,(unsigned short [3]));
long _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3]));
unsigned short *
_EXFUN(seed48,(unsigned short [3]));
unsigned short *
_EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
_VOID _EXFUN(srand48,(long));
_VOID _EXFUN(_srand48_r,(struct _reent *, long));
void _EXFUN(srand48,(long));
void _EXFUN(_srand48_r,(struct _reent *, long));
#endif /* __SVID_VISIBLE || __XSI_VISIBLE */
#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE
char * _EXFUN(initstate,(unsigned, char *, size_t));
long _EXFUN(random,(_VOID));
long _EXFUN(random,(void));
char * _EXFUN(setstate,(char *));
_VOID _EXFUN(srandom,(unsigned));
void _EXFUN(srandom,(unsigned));
#endif
#if __ISO_C_VISIBLE >= 1999
long long _EXFUN(atoll,(const char *__nptr));
Expand All @@ -273,7 +273,7 @@ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict _

#ifndef __CYGWIN__
#if __MISC_VISIBLE
_VOID _EXFUN(cfree,(void *));
void _EXFUN(cfree,(void *));
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(unsetenv,(const char *__string));
Expand All @@ -289,26 +289,26 @@ char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
#ifndef __CYGWIN__
void * _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
void * _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t));
_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, void *));
void _EXFUN_NOTHROW(_free_r,(struct _reent *, void *));
void * _EXFUN_NOTHROW(_realloc_r,(struct _reent *, void *, size_t));
_VOID _EXFUN(_mstats_r,(struct _reent *, char *));
void _EXFUN(_mstats_r,(struct _reent *, char *));
#endif
int _EXFUN(_system_r,(struct _reent *, const char *));

_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
void _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));

/* There are two common qsort_r variants. If you request
_BSD_SOURCE, you get the BSD version; otherwise you get the GNU
version. We want that #undef qsort_r will still let you
invoke the underlying function, but that requires gcc support. */
#if __GNU_VISIBLE
_VOID _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, int (*_compar)(const void *, const void *, void *), void *__thunk));
void _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, int (*_compar)(const void *, const void *, void *), void *__thunk));
#elif __BSD_VISIBLE
# ifdef __GNUC__
_VOID _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)))
void _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)))
__asm__ (__ASMNAME ("__bsd_qsort_r"));
# else
_VOID _EXFUN(__bsd_qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)));
void _EXFUN(__bsd_qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)));
# define qsort_r __bsd_qsort_r
# endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/include/sys/iconvnls.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define ICONV_NLS_FROM 0
#define ICONV_NLS_TO 1

_VOID
void
_EXFUN(_iconv_nls_get_state, (iconv_t cd, mbstate_t *ps, int direction));

int
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/include/sys/reent.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct __sFILE_fake {
/* Following is needed both in libc/stdio and libc/stdlib so we put it
* here instead of libc/stdio/local.h where it was previously. */

extern _VOID _EXFUN(__sinit,(struct _reent *));
extern void _EXFUN(__sinit,(struct _reent *));

# define _REENT_SMALL_CHECK_INIT(ptr) \
do \
Expand Down
8 changes: 4 additions & 4 deletions newlib/libc/include/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ char *strptime_l (const char *__restrict, const char *__restrict,
#endif

#if __POSIX_VISIBLE
_VOID _EXFUN(tzset, (_VOID));
void _EXFUN(tzset, (void));
#endif
_VOID _EXFUN(_tzset_r, (struct _reent *));
void _EXFUN(_tzset_r, (struct _reent *));

typedef struct __tzrule_struct
{
Expand All @@ -120,15 +120,15 @@ typedef struct __tzinfo_struct
__tzrule_type __tzrule[2];
} __tzinfo_type;

__tzinfo_type *_EXFUN (__gettzinfo, (_VOID));
__tzinfo_type *_EXFUN (__gettzinfo, (void));

/* getdate functions */

#ifdef HAVE_GETDATE
#if __XSI_VISIBLE >= 4
#ifndef _REENT_ONLY
#define getdate_err (*__getdate_err())
int *_EXFUN(__getdate_err,(_VOID));
int *_EXFUN(__getdate_err,(void));

struct tm * _EXFUN(getdate, (const char *));
/* getdate_err is set to one of the following values to indicate the error.
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/microblaze/abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Supporting OS subroutines required: <<_exit>> and optionally, <<write>>.
#include <unistd.h>
#include <signal.h>

_VOID
void
abort (void)
{
#ifdef ABORT_MESSAGE
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/nds32/abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Supporting OS subroutines required: <<_exit>>.

#include <unistd.h>

_VOID
void
abort (void)
{
while (1)
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/powerpc/machine/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

void *_EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
void *_EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
_VOID _EXFUN(vec_free,(void *));
void _EXFUN(vec_free,(void *));
#define _vec_freer _freer
void *_EXFUN(vec_malloc,(size_t __size));
#define _vec_mallocr _memalign_r
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/powerpc/machine/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

void *_EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
void *_EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
_VOID _EXFUN(vec_free,(void *));
void _EXFUN(vec_free,(void *));
#define _vec_freer _freer
void *_EXFUN(vec_malloc,(size_t __size));
#define _vec_mallocr _memalign_r
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/spu/clearerr.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Author: Joel Schopp <[email protected]>

#ifndef _REENT_ONLY

_VOID
void
_DEFUN (clearerr, (fp),
FILE * fp)

Expand Down
6 changes: 3 additions & 3 deletions newlib/libc/machine/spu/stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ _DEFUN (__sfp, (d),
return NULL;
}

static _VOID
static void
_DEFUN (__cleanup, (s),
struct _reent *s)
{
Expand All @@ -64,7 +64,7 @@ _DEFUN (__cleanup, (s),
}
}

_VOID
void
_DEFUN (__sinit, (s),
struct _reent *s)
{
Expand All @@ -81,7 +81,7 @@ _DEFUN (__sinit, (s),
s->_stderr->_fp = SPE_STDERR;
}

_VOID
void
__check_init (void)
{
CHECK_INIT(_REENT);
Expand Down
Loading

0 comments on commit 67ee0ca

Please sign in to comment.