# HG changeset patch # User John W. Eaton # Date 1454982055 18000 # Node ID 25150962bfd3b3f4d81bb65cf901fed5a0a4bcd9 # Parent a55b8ece1ecdd37e75cb7ec3e85faa49737491eb eliminate CRUFT_API macro * oct-conf-post.in.h (CRUFT_API): Delete definition. * f77-fcn.h, lo-error.h, quit.h: Use OCTAVE_API instead of CRUFT_API. diff -r a55b8ece1ecd -r 25150962bfd3 liboctave/cruft/misc/f77-fcn.h --- a/liboctave/cruft/misc/f77-fcn.h Mon Feb 08 23:14:56 2016 -0500 +++ b/liboctave/cruft/misc/f77-fcn.h Mon Feb 08 20:40:55 2016 -0500 @@ -74,7 +74,7 @@ while (0) /* So we can check to see if an exception has occurred. */ -CRUFT_API extern int f77_exception_encountered; +OCTAVE_API extern int f77_exception_encountered; #if ! defined (F77_FCN) #define F77_FCN(f, F) F77_FUNC (f, F) @@ -283,7 +283,7 @@ cs[F77_CHAR_ARG_LEN_USE(s, len)] = '\0' -OCTAVE_NORETURN CRUFT_API extern +OCTAVE_NORETURN OCTAVE_API extern F77_RET_T F77_FUNC (xstopx, XSTOPX) (F77_CONST_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); diff -r a55b8ece1ecd -r 25150962bfd3 liboctave/cruft/misc/lo-error.h --- a/liboctave/cruft/misc/lo-error.h Mon Feb 08 23:14:56 2016 -0500 +++ b/liboctave/cruft/misc/lo-error.h Mon Feb 08 20:40:55 2016 -0500 @@ -27,14 +27,17 @@ extern "C" { #endif -OCTAVE_NORETURN extern void liboctave_fatal (const char *fmt, ...); +OCTAVE_NORETURN extern void +liboctave_fatal (const char *fmt, ...); OCTAVE_NORETURN extern void liboctave_fatal_with_id (const char *id, const char *fmt, ...); -extern void liboctave_warning (const char *fmt, ...); +extern void +liboctave_warning (const char *fmt, ...); -extern void liboctave_warning_with_id (const char *id, const char *fmt, ...); +extern void +liboctave_warning_with_id (const char *id, const char *fmt, ...); typedef void (*liboctave_error_handler) (const char *, ...); @@ -46,21 +49,25 @@ /* Would be nice to make these pointers private, but we want to share them among all the liboctave classes. */ -OCTAVE_NORETURN CRUFT_API extern liboctave_error_handler current_liboctave_error_handler; +OCTAVE_NORETURN OCTAVE_API extern liboctave_error_handler current_liboctave_error_handler; -OCTAVE_NORETURN CRUFT_API extern liboctave_error_with_id_handler current_liboctave_error_with_id_handler; +OCTAVE_NORETURN OCTAVE_API extern liboctave_error_with_id_handler current_liboctave_error_with_id_handler; -CRUFT_API extern liboctave_warning_handler current_liboctave_warning_handler; +OCTAVE_API extern liboctave_warning_handler current_liboctave_warning_handler; -CRUFT_API extern liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler; +OCTAVE_API extern liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler; -CRUFT_API extern void set_liboctave_error_handler (OCTAVE_NORETURN liboctave_error_handler f); +OCTAVE_API extern void +set_liboctave_error_handler (OCTAVE_NORETURN liboctave_error_handler f); -CRUFT_API extern void set_liboctave_error_with_id_handler (OCTAVE_NORETURN liboctave_error_with_id_handler f); +OCTAVE_API extern void +set_liboctave_error_with_id_handler (OCTAVE_NORETURN liboctave_error_with_id_handler f); -CRUFT_API extern void set_liboctave_warning_handler (liboctave_warning_handler f); +OCTAVE_API extern void +set_liboctave_warning_handler (liboctave_warning_handler f); -CRUFT_API extern void set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f); +OCTAVE_API extern void +set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f); #ifdef __cplusplus } diff -r a55b8ece1ecd -r 25150962bfd3 liboctave/cruft/misc/quit.h --- a/liboctave/cruft/misc/quit.h Mon Feb 08 23:14:56 2016 -0500 +++ b/liboctave/cruft/misc/quit.h Mon Feb 08 20:40:55 2016 -0500 @@ -39,10 +39,10 @@ #define WIN32_LEAN_AND_MEAN 1 #include -CRUFT_API extern void w32_sigint_init (void); /* setup */ -CRUFT_API extern void w32_raise_final (void); /* tear down */ -CRUFT_API extern void w32_raise (int sig); /* raise signal in main thread */ -CRUFT_API extern int w32_in_main_thread (void); /* return true if in main thread */ +OCTAVE_API extern void w32_sigint_init (void); /* setup */ +OCTAVE_API extern void w32_raise_final (void); /* tear down */ +OCTAVE_API extern void w32_raise (int sig); /* raise signal in main thread */ +OCTAVE_API extern int w32_in_main_thread (void); /* return true if in main thread */ #endif @@ -60,17 +60,17 @@ #endif -CRUFT_API extern octave_jmp_buf current_context; +OCTAVE_API extern octave_jmp_buf current_context; -CRUFT_API extern void octave_save_current_context (void *); +OCTAVE_API extern void octave_save_current_context (void *); -CRUFT_API extern void octave_restore_current_context (void *); +OCTAVE_API extern void octave_restore_current_context (void *); -OCTAVE_NORETURN CRUFT_API extern void octave_jump_to_enclosing_context (void); +OCTAVE_NORETURN OCTAVE_API extern void octave_jump_to_enclosing_context (void); -CRUFT_API extern void octave_save_signal_mask (void); +OCTAVE_API extern void octave_save_signal_mask (void); -CRUFT_API extern void octave_restore_signal_mask (void); +OCTAVE_API extern void octave_restore_signal_mask (void); #ifdef __cplusplus class @@ -126,28 +126,28 @@ octave_alloc_exception = 2 }; -CRUFT_API extern sig_atomic_t octave_interrupt_immediately; +OCTAVE_API extern sig_atomic_t octave_interrupt_immediately; /* > 0: interrupt pending 0: no interrupt pending < 0: handling interrupt */ -CRUFT_API extern sig_atomic_t octave_interrupt_state; +OCTAVE_API extern sig_atomic_t octave_interrupt_state; -CRUFT_API extern sig_atomic_t octave_exception_state; +OCTAVE_API extern sig_atomic_t octave_exception_state; -CRUFT_API extern volatile sig_atomic_t octave_signal_caught; +OCTAVE_API extern volatile sig_atomic_t octave_signal_caught; -CRUFT_API extern void octave_handle_signal (void); +OCTAVE_API extern void octave_handle_signal (void); -OCTAVE_NORETURN CRUFT_API extern void octave_throw_interrupt_exception (void); +OCTAVE_NORETURN OCTAVE_API extern void octave_throw_interrupt_exception (void); -OCTAVE_NORETURN CRUFT_API extern void octave_throw_execution_exception (void); +OCTAVE_NORETURN OCTAVE_API extern void octave_throw_execution_exception (void); -OCTAVE_NORETURN CRUFT_API extern void octave_throw_bad_alloc (void); +OCTAVE_NORETURN OCTAVE_API extern void octave_throw_bad_alloc (void); -CRUFT_API extern void octave_rethrow_exception (void); +OCTAVE_API extern void octave_rethrow_exception (void); #ifdef __cplusplus inline void octave_quit (void) @@ -258,9 +258,9 @@ /* These should only be declared for C++ code, and should also be outside of any extern "C" block. */ -extern CRUFT_API void (*octave_signal_hook) (void); -extern CRUFT_API void (*octave_interrupt_hook) (void); -extern CRUFT_API void (*octave_bad_alloc_hook) (void); +extern OCTAVE_API void (*octave_signal_hook) (void); +extern OCTAVE_API void (*octave_interrupt_hook) (void); +extern OCTAVE_API void (*octave_bad_alloc_hook) (void); #endif diff -r a55b8ece1ecd -r 25150962bfd3 oct-conf-post.in.h --- a/oct-conf-post.in.h Mon Feb 08 23:14:56 2016 -0500 +++ b/oct-conf-post.in.h Mon Feb 08 20:40:55 2016 -0500 @@ -133,13 +133,6 @@ # define OCTAVE_IMPORT #endif -/* API macro for libcruft */ -#if defined (CRUFT_DLL) -# define CRUFT_API OCTAVE_EXPORT -#else -# define CRUFT_API OCTAVE_IMPORT -#endif - /* API macro for liboctave */ #if defined (OCTAVE_DLL) # define OCTAVE_API OCTAVE_EXPORT