Skip to content
Snippets Groups Projects
Commit 24e8358e authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Update core_cf.c from PPM.

parent e25450aa
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,6 @@
# include <config.h>
#endif
#include <stdio.h>
#include <stdint.h>
#define FCALLSC_QUALIFIER PPM_DSO_INTERNAL
......@@ -82,12 +81,12 @@ FCALLSCSUB1(SymPrefix(set_default_comm_f), SYMPREFIX(SET_DEFAULT_COMM),
static void
abort_f(MPI_Fint *comm_f, const char *msg,
const char *source, int line)
const char *source, int line)
__attribute__((noreturn));
static void
abort_f(MPI_Fint *comm_f, const char *msg,
const char *source, int line)
const char *source, int line)
{
MPI_Comm comm_c = MPI_COMM_NULL;
#if defined(USE_MPI)
......@@ -110,6 +109,17 @@ FCALLSCSUB4(abort_f, SYMPREFIX(ABORT), symprefix(abort),
#undef CFattributes
#define CFattributes
static void
pure_abort_f(MPI_Fint *ierror, MPI_Fint *comm_f, const char *msg,
const char *source, int line)
{
*ierror = -1;
abort_f(comm_f, msg, source, line);
}
FCALLSCSUB5(pure_abort_f, SYMPREFIX(ABORT_PURE), symprefix(abort_pure),
PVOID, PVOID, STRING, STRING, INT)
static void
SymPrefix(abort_handler_wrapper)(MPI_Comm comm, const char msg[],
const char source[], int line)
......@@ -194,8 +204,7 @@ SymPrefix(abort_handler_wrapper)(MPI_Comm comm, const char msg[],
MPI_Fint comm_f = comm;
#endif
/* cfortran.h does not understand const char * */
char *msg_arg = (char *)(intptr_t)msg,
*source_arg = (char *)(intptr_t)source;
char *msg_arg = (char *)msg, *source_arg = (char *)source;
#undef CPPPROTOCLSFSUB14
#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
CCALLSFSUB4(*SymPrefix(fortran_abort_fp),,PVOID,STRING,STRING,INT,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment