* remove the pre-ANSI C vararg code, only have the ANSI-C stdarg code
This commit was SVN r3138.
Этот коммит содержится в:
родитель
e020d15139
Коммит
d7528d1fd3
@ -123,18 +123,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
|
#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <stdarg.h>
|
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#endif /* __STDC__ */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3,11 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "util/output.h"
|
#include "util/output.h"
|
||||||
#include "errhandler/errhandler.h"
|
#include "errhandler/errhandler.h"
|
||||||
@ -33,11 +29,7 @@ void ompi_mpi_errors_are_fatal_comm_handler(struct ompi_communicator_t **comm,
|
|||||||
char *name;
|
char *name;
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(arglist, error_code);
|
va_start(arglist, error_code);
|
||||||
#else
|
|
||||||
va_start(arglist);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (NULL != comm) {
|
if (NULL != comm) {
|
||||||
name = (*comm)->c_name;
|
name = (*comm)->c_name;
|
||||||
@ -54,11 +46,7 @@ void ompi_mpi_errors_are_fatal_file_handler(struct ompi_file_t **file,
|
|||||||
char *name;
|
char *name;
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(arglist, error_code);
|
va_start(arglist, error_code);
|
||||||
#else
|
|
||||||
va_start(arglist);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (NULL != file) {
|
if (NULL != file) {
|
||||||
name = (*file)->f_filename;
|
name = (*file)->f_filename;
|
||||||
@ -75,11 +63,7 @@ void ompi_mpi_errors_are_fatal_win_handler(struct ompi_win_t **win,
|
|||||||
char *name;
|
char *name;
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(arglist, error_code);
|
va_start(arglist, error_code);
|
||||||
#else
|
|
||||||
va_start(arglist);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (NULL != win) {
|
if (NULL != win) {
|
||||||
name = (*win)->w_name;
|
name = (*win)->w_name;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "include/constants.h"
|
#include "include/constants.h"
|
||||||
#include "runtime/runtime.h"
|
#include "runtime/runtime.h"
|
||||||
@ -18,11 +19,7 @@ int ompi_abort(int status, char *fmt, ...)
|
|||||||
|
|
||||||
/* If there was a message, output it */
|
/* If there was a message, output it */
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(arglist, fmt);
|
va_start(arglist, fmt);
|
||||||
#else
|
|
||||||
va_start(arglist);
|
|
||||||
#endif
|
|
||||||
if (NULL != fmt) {
|
if (NULL != fmt) {
|
||||||
ompi_output(0, fmt);
|
ompi_output(0, fmt);
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "include/constants.h"
|
#include "include/constants.h"
|
||||||
#include "util/os_path.h"
|
#include "util/os_path.h"
|
||||||
@ -20,13 +21,8 @@ char *ompi_os_path(bool relative, ...)
|
|||||||
char *element, *path;
|
char *element, *path;
|
||||||
int num_elements, total_length;
|
int num_elements, total_length;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, relative);
|
va_start(ap, relative);
|
||||||
va_start(ap1, relative);
|
va_start(ap1, relative);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
va_start(ap1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* make sure system info is filled and separator is non-NULL */
|
/* make sure system info is filled and separator is non-NULL */
|
||||||
ompi_sys_info();
|
ompi_sys_info();
|
||||||
|
@ -12,15 +12,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <stdarg.h>
|
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#endif /* __STDC__ */
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -58,11 +58,7 @@ int ompi_show_help(const char *filename, const char *topic,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(arglist, want_error_header);
|
va_start(arglist, want_error_header);
|
||||||
#else
|
|
||||||
va_start(arglist);
|
|
||||||
#endif
|
|
||||||
output(want_error_header, &array, filename, topic, arglist);
|
output(want_error_header, &array, filename, topic, arglist);
|
||||||
va_end(arglist);
|
va_end(arglist);
|
||||||
|
|
||||||
|
@ -76,15 +76,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <stdarg.h>
|
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#endif /* __STDC__ */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user