2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
15 * Additional copyrights may follow
20 #include "ompi_config.h"
22 #include "ompi/mpi/c/bindings.h"
23 #include "ompi/mpi/f77/fint_2_int.h"
25 #if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
26 #pragma weak MPI_Errhandler_c2f = PMPI_Errhandler_c2f
29 #if OMPI_PROFILING_DEFINES
30 #include "ompi/mpi/c/profile/defines.h"
33 static const char FUNC_NAME
[] = "MPI_Errhandler_c2f";
36 MPI_Fint
MPI_Errhandler_c2f(MPI_Errhandler errhandler
)
40 if (MPI_PARAM_CHECK
) {
41 OMPI_ERR_INIT_FINALIZE(FUNC_NAME
);
43 /* mapping an invalid handle to a null handle */
44 if (NULL
== errhandler
) {
45 return OMPI_INT_2_FINT(-1);
50 return OMPI_INT_2_FINT(errhandler
->eh_f_to_c_index
);