Skip to content

Commit

Permalink
ansification: remove _EXFUN, _EXFUN_NOTHROW
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 77f16db commit 70ee6b1
Show file tree
Hide file tree
Showing 98 changed files with 1,767 additions and 1,825 deletions.
2 changes: 1 addition & 1 deletion libgloss/aarch64/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ register char * stack_ptr asm ("sp");


/* following is copied from libc/stdio/local.h to check std streams */
extern void _EXFUN (__sinit, (struct _reent *));
extern void __sinit (struct _reent *);
#define CHECK_INIT(ptr) \
do \
{ \
Expand Down
2 changes: 1 addition & 1 deletion libgloss/arm/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ register char * stack_ptr asm ("sp");


/* following is copied from libc/stdio/local.h to check std streams */
extern void _EXFUN(__sinit,(struct _reent *));
extern void __sinit (struct _reent *);
#define CHECK_INIT(ptr) \
do \
{ \
Expand Down
2 changes: 1 addition & 1 deletion libgloss/mcore/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
#include "glue.h"

extern int _EXFUN (outbyte, (char x));
extern int outbyte (char x);

/*
* write -- write bytes to the serial port. Ignore fd, since
Expand Down
4 changes: 2 additions & 2 deletions libgloss/sparc_leon/asm-leon/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <asm-leon/param.h>

#ifndef __ASSEMBLER__
int _EXFUN (gettimeofday, (struct timeval * __p, void *__tz));
int _EXFUN (settimeofday, (const struct timeval *, const struct timezone *));
int gettimeofday (struct timeval * __p, void *__tz);
int settimeofday (const struct timeval *, const struct timezone *);
void do_gettimeofday (struct timeval *tv);
#endif

Expand Down
2 changes: 1 addition & 1 deletion libgloss/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
#include "glue.h"

extern int _EXFUN (outbyte, (char x));
extern int outbyte (char x);

/*
* write -- write bytes to the serial port. Ignore fd, since
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/ctype/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
to the requirements of the underlying OS. */
#define _jp2uc(c) (c)
#else
wint_t _EXFUN (_jp2uc, (wint_t));
wint_t _jp2uc (wint_t);
#endif
8 changes: 4 additions & 4 deletions newlib/libc/iconv/ces/table.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@
*/

static ucs2_t
_EXFUN(find_code_size, (ucs2_t code, const __uint16_t *tblp));
find_code_size (ucs2_t code, const __uint16_t *tblp);

static __inline ucs2_t
_EXFUN(find_code_speed, (ucs2_t code, const __uint16_t *tblp));
find_code_speed (ucs2_t code, const __uint16_t *tblp);

static __inline ucs2_t
_EXFUN(find_code_speed_8bit, (ucs2_t code, const unsigned char *tblp));
find_code_speed_8bit (ucs2_t code, const unsigned char *tblp);

#ifdef _ICONV_ENABLE_EXTERNAL_CCS
static const iconv_ccs_desc_t *
_EXFUN(load_file, (struct _reent *rptr, const char *name, int direction));
load_file (struct _reent *rptr, const char *name, int direction);
#endif

/*
Expand Down
4 changes: 2 additions & 2 deletions newlib/libc/iconv/lib/ucsconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
static int fake_data;

static int
_EXFUN(find_encoding_name, (const char *searchee,
const char **names));
find_encoding_name (const char *searchee,
const char **names);


/*
Expand Down
9 changes: 0 additions & 9 deletions newlib/libc/include/_ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,10 @@
#endif

#ifdef _HAVE_STDC
#ifdef __CYGWIN__
#define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW
#define _EXFUN(name, proto) __cdecl name proto
#else
#define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW
#define _EXFUN(name, proto) name proto
#endif
#ifndef _LONG_DOUBLE
#define _LONG_DOUBLE long double
#endif
#else
#define _EXFUN(name, proto) name()
#define _EXFUN_NOTHROW(name, proto) name()
#define _LONG_DOUBLE double
#endif

Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/include/alloca.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifdef __GNUC__
#define alloca(size) __builtin_alloca(size)
#else
void * _EXFUN(alloca,(size_t));
void * alloca (size_t);
#endif

#endif
8 changes: 4 additions & 4 deletions newlib/libc/include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ extern "C" {
# endif /* !__ASSERT_FUNC */
#endif /* !NDEBUG */

void _EXFUN(__assert, (const char *, int, const char *)
_ATTRIBUTE ((__noreturn__)));
void _EXFUN(__assert_func, (const char *, int, const char *, const char *)
_ATTRIBUTE ((__noreturn__)));
void __assert (const char *, int, const char *)
_ATTRIBUTE ((__noreturn__));
void __assert_func (const char *, int, const char *, const char *)
_ATTRIBUTE ((__noreturn__));

#if __STDC_VERSION__ >= 201112L && !defined __cplusplus
# define static_assert _Static_assert
Expand Down
32 changes: 16 additions & 16 deletions newlib/libc/include/ctype.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@

_BEGIN_STD_C

int _EXFUN(isalnum, (int __c));
int _EXFUN(isalpha, (int __c));
int _EXFUN(iscntrl, (int __c));
int _EXFUN(isdigit, (int __c));
int _EXFUN(isgraph, (int __c));
int _EXFUN(islower, (int __c));
int _EXFUN(isprint, (int __c));
int _EXFUN(ispunct, (int __c));
int _EXFUN(isspace, (int __c));
int _EXFUN(isupper, (int __c));
int _EXFUN(isxdigit,(int __c));
int _EXFUN(tolower, (int __c));
int _EXFUN(toupper, (int __c));
int isalnum (int __c);
int isalpha (int __c);
int iscntrl (int __c);
int isdigit (int __c);
int isgraph (int __c);
int islower (int __c);
int isprint (int __c);
int ispunct (int __c);
int isspace (int __c);
int isupper (int __c);
int isxdigit (int __c);
int tolower (int __c);
int toupper (int __c);

#if __ISO_C_VISIBLE >= 1999
int _EXFUN(isblank, (int __c));
int isblank (int __c);
#endif

#if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(isascii, (int __c));
int _EXFUN(toascii, (int __c));
int isascii (int __c);
int toascii (int __c);
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
#define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A')
#endif
Expand Down
4 changes: 2 additions & 2 deletions newlib/libc/include/envlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define ENV_LOCK __env_lock(reent_ptr)
#define ENV_UNLOCK __env_unlock(reent_ptr)

void _EXFUN(__env_lock,(struct _reent *reent));
void _EXFUN(__env_unlock,(struct _reent *reent));
void __env_lock (struct _reent *reent);
void __env_unlock (struct _reent *reent);

#endif /* _INCLUDE_ENVLOCK_H_ */
28 changes: 11 additions & 17 deletions newlib/libc/include/getopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,31 +153,25 @@ extern "C"
extern int optopt;

/* function prototypes */
int _EXFUN (getopt,
(int __argc, char *const __argv[], const char *__optstring));
int getopt (int __argc, char *const __argv[], const char *__optstring);

int _EXFUN (getopt_long,
(int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind));
int getopt_long (int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind);

int _EXFUN (getopt_long_only,
(int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind));
int getopt_long_only (int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind);

#ifdef __need_getopt_newlib
int _EXFUN (__getopt_r,
(int __argc, char *const __argv[], const char *__optstring,
struct getopt_data * __data));
int __getopt_r (int __argc, char *const __argv[], const char *__optstring,
struct getopt_data * __data);

int _EXFUN (__getopt_long_r,
(int __argc, char *const __argv[], const char *__shortopts,
int __getopt_long_r (int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind,
struct getopt_data * __data));
struct getopt_data * __data);

int _EXFUN (__getopt_long_only_r,
(int __argc, char *const __argv[], const char *__shortopts,
int __getopt_long_only_r (int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind,
struct getopt_data * __data));
struct getopt_data * __data);
#endif /* __need_getopt_newlib */

#ifdef __cplusplus
Expand Down
16 changes: 8 additions & 8 deletions newlib/libc/include/iconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ _BEGIN_STD_C

#ifndef _REENT_ONLY
iconv_t
_EXFUN(iconv_open, (const char *, const char *));
iconv_open (const char *, const char *);

size_t
_EXFUN(iconv, (iconv_t, char **__restrict, size_t *__restrict,
char **__restrict, size_t *__restrict));
iconv (iconv_t, char **__restrict, size_t *__restrict,
char **__restrict, size_t *__restrict);

int
_EXFUN(iconv_close, (iconv_t));
iconv_close (iconv_t);
#endif

iconv_t
_EXFUN(_iconv_open_r, (struct _reent *, const char *, const char *));
_iconv_open_r (struct _reent *, const char *, const char *);

size_t
_EXFUN(_iconv_r, (struct _reent *, iconv_t, const char **,
size_t *, char **, size_t *));
_iconv_r (struct _reent *, iconv_t, const char **,
size_t *, char **, size_t *);

int
_EXFUN(_iconv_close_r, (struct _reent *, iconv_t));
_iconv_close_r (struct _reent *, iconv_t);

_END_STD_C

Expand Down
16 changes: 8 additions & 8 deletions newlib/libc/include/ieeefp.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ typedef int fp_rnd;
#define FP_RP 2 /* Round up */
#define FP_RZ 3 /* Round to zero (trunate) */

fp_rnd _EXFUN(fpgetround,(void));
fp_rnd _EXFUN(fpsetround, (fp_rnd));
fp_rnd fpgetround (void);
fp_rnd fpsetround (fp_rnd);

/* EXCEPTIONS */

Expand All @@ -227,19 +227,19 @@ typedef int fp_except;
#define FP_X_UFL 0x02 /* Underflow exception */
#define FP_X_IMP 0x01 /* imprecise exception */

fp_except _EXFUN(fpgetmask,(void));
fp_except _EXFUN(fpsetmask,(fp_except));
fp_except _EXFUN(fpgetsticky,(void));
fp_except _EXFUN(fpsetsticky, (fp_except));
fp_except fpgetmask (void);
fp_except fpsetmask (fp_except);
fp_except fpgetsticky (void);
fp_except fpsetsticky (fp_except);

/* INTEGER ROUNDING */

typedef int fp_rdi;
#define FP_RDI_TOZ 0 /* Round to Zero */
#define FP_RDI_RD 1 /* Follow float mode */

fp_rdi _EXFUN(fpgetroundtoi,(void));
fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi));
fp_rdi fpgetroundtoi (void);
fp_rdi fpsetroundtoi (fp_rdi);

#define __IEEE_DBL_EXPBIAS 1023
#define __IEEE_FLT_EXPBIAS 127
Expand Down
4 changes: 2 additions & 2 deletions newlib/libc/include/libgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
sure here. */
#undef basename
#define basename __xpg_basename
char *_EXFUN(basename, (char *)) __asm__(__ASMNAME("basename"));
char *_EXFUN(dirname, (char *));
char *basename (char *) __asm__(__ASMNAME("basename"));
char *dirname (char *);

#ifdef __cplusplus
}
Expand Down
8 changes: 4 additions & 4 deletions newlib/libc/include/locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ struct lconv
};

struct _reent;
char *_EXFUN(_setlocale_r,(struct _reent *, int, const char *));
struct lconv *_EXFUN(_localeconv_r,(struct _reent *));
char *_setlocale_r (struct _reent *, int, const char *);
struct lconv *_localeconv_r (struct _reent *);

struct __locale_t *_newlocale_r (struct _reent *, int, const char *,
struct __locale_t *);
Expand All @@ -79,8 +79,8 @@ struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *);

#ifndef _REENT_ONLY

char *_EXFUN(setlocale,(int, const char *));
struct lconv *_EXFUN(localeconv,(void));
char *setlocale (int, const char *);
struct lconv *localeconv (void);

#if __POSIX_VISIBLE >= 200809
locale_t newlocale (int, const char *, locale_t);
Expand Down
Loading

0 comments on commit 70ee6b1

Please sign in to comment.