1
1

- Add #if protection around non-portable system .h files

- Add #include "ompi_config.h" to all .c files, and ensure that it's
  the first #included file
- remove a few useless #if HAVE_CONFIG_H checks

This commit was SVN r3229.
This commit is contained in:
Jeff Squyres 2004-10-20 01:03:09 +00:00
parent ceafa4d178
commit d324a7725c
219 changed files with 492 additions and 43 deletions

View File

@ -2,9 +2,7 @@
* $HEADER$
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include "class/ompi_free_list.h"

View File

@ -2,9 +2,7 @@
* $HEADER$
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include <string.h>
#include <stdlib.h>

View File

@ -2,9 +2,7 @@
* $HEADER$
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include "class/ompi_list.h"

View File

@ -8,9 +8,7 @@
* Implementation of ompi_object_t, the base ompi foundation class
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include <stdio.h>

View File

@ -7,9 +7,7 @@
* Utility functions to manage fortran <-> c opaque object translation
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -5,9 +5,7 @@
* @file
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include "class/ompi_rb_tree.h"

View File

@ -2,9 +2,7 @@
* $HEADER$
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include "class/ompi_value_array.h"

View File

@ -5,7 +5,9 @@
#include "ompi_config.h"
#include <string.h>
#include <stdio.h>
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#include "mpi.h"
#include "communicator/communicator.h"

View File

@ -12,9 +12,15 @@
#define DATATYPE_H_HAS_BEEN_INCLUDED
#include "ompi_config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
#include "include/constants.h"
#include "class/ompi_object.h"

View File

@ -1,10 +1,13 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"
#include <time.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
#define TIMER_DATA_TYPE struct timeval

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"
#include "limits.h"

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
int ompi_ddt_create_subarray( int ndims, int* pSizes, int* pSubSizes, int* pStarts,

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
/* We try to merge together data that are contiguous */

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
int ompi_ddt_create_struct( int count, int* pBlockLength, long* pDisp,

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
/* Open questions ...

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"

View File

@ -1,5 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
#include "ompi_config.h"
#include "datatype.h"
#include "datatype_internal.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <stdlib.h>
#include <stdarg.h>

View File

@ -28,14 +28,20 @@
#include "config.h"
#include <windows.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_ERR_H
#include <err.h>
#endif
#ifdef USE_LOG
#include "log.h"

View File

@ -35,7 +35,9 @@
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
/*
* Structure returned by gettimeofday(2) system call,

View File

@ -26,9 +26,15 @@
*/
#include "ompi_config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@ -40,7 +46,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <err.h>

View File

@ -24,13 +24,21 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/syscall.h>
#include <sys/epoll.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int
epoll_create(int size)

View File

@ -34,7 +34,9 @@
#undef WIN32_LEAN_AND_MEAN
#include "misc.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/tree.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
@ -45,8 +47,10 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef WIN32
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#endif
#include <errno.h>
#include <string.h>
#include <err.h>

View File

@ -28,7 +28,9 @@
*/
#include "ompi_config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@ -40,7 +42,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <err.h>
#ifdef HAVE_INTTYPES_H

View File

@ -28,19 +28,25 @@
*/
#include "ompi_config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <sys/_time.h>
#endif
#include <sys/queue.h>
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <err.h>

View File

@ -3,7 +3,9 @@
/* Enable F_SETSIG and F_SETOWN */
#define _GNU_SOURCE
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@ -21,7 +23,9 @@
#ifndef HAVE_WORKING_RTSIG
#include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#define EVLIST_X_NORT 0x1000 /* Skip RT signals (internal) */

View File

@ -3,12 +3,20 @@
* cc -I/usr/local/include -o event-test event-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifndef WIN32
#ifdef HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#else
#include <windows.h>
#endif

View File

@ -3,12 +3,20 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifndef WIN32
#ifdef HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#else
#include <windows.h>
#endif

View File

@ -3,15 +3,23 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifndef WIN32
#ifdef HAVE_SYS_QUEUE_H
#include <sys/queue.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#else
#include <time.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -29,7 +29,9 @@
#include "ompi_config.h"
#include "util/output.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@ -40,7 +42,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <err.h>
#include "mca/oob/base/base.h"

View File

@ -28,7 +28,9 @@
*/
#include "ompi_config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
@ -39,7 +41,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <err.h>

View File

@ -37,17 +37,27 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/signal.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -29,16 +29,24 @@
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/signal.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -3,15 +3,23 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -3,15 +3,23 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -3,14 +3,20 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -3,16 +3,24 @@
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <event.h>

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "group/group.h"
#include "include/constants.h"
#include "mpi.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "group/group.h"
#include "include/constants.h"
#include "mpi.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "group/group.h"
#include "include/constants.h"

View File

@ -5,8 +5,12 @@
#ifndef OMPI_H
#define OMPI_H
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include "ompi_config.h"
#include "types.h"

View File

@ -5,9 +5,15 @@
#ifndef OMPI_TYPES_H
#define OMPI_TYPES_H
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include "ompi_config.h"
/*

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "info/info.h"
#include "include/constants.h"
#include "mpi/runtime/params.h"

View File

@ -1,3 +1,4 @@
#include "ompi_config.h"
#include "mca/allocator/allocator.h"
#include "include/constants.h"
#include "mca/base/mca_base_param.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "include/constants.h"
#include "mca/allocator/bucket/allocator_bucket_alloc.h"
/**

View File

@ -2,8 +2,8 @@
* $HEADER$
*/
#include <string.h>
#include "ompi_config.h"
#include <string.h>
#include "class/ompi_hash_table.h"
#include "threads/condition.h"
#include "util/proc_info.h"

View File

@ -1,3 +1,4 @@
#include "ompi_config.h"
#include <errno.h>
#include <unistd.h>
#include <string.h>

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "mpi.h"
#include "mca/io/io.h"
#include "io_romio.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "mpi.h"
#include "file/file.h"
#include "request/request.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "mpi.h"
#include "file/file.h"
#include "request/request.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "mpi.h"
#include "file/file.h"
#include "io_romio.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "util/output.h"
#include "mca/base/base.h"
#include "mca/base/mca_base_param.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include "util/output.h"
#include "mca/mpool/sm/mpool_sm.h"

View File

@ -4,11 +4,11 @@
/** @file:
*
*/
#include "ompi_config.h"
#include <stdio.h>
#include "threads/mutex.h"
#include "ompi_config.h"
#include "util/output.h"
#include "mca/mca.h"
#include "mca/ns/base/base.h"

View File

@ -4,10 +4,10 @@
*
*/
#include "ompi_config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "ompi_config.h"
#include "include/types.h"
#include "include/constants.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include "mca/oob/tcp/oob_tcp.h"
#include "mca/oob/tcp/oob_tcp_msg.h"

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/uio.h>

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include "mca/oob/tcp/oob_tcp.h"
/*

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include "mca/oob/tcp/oob_tcp.h"
/*

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include "mca/oob/tcp/oob_tcp.h"
/*

View File

@ -1,3 +1,4 @@
#include "ompi_config.h"
#include "threads/mutex.h"
#include "threads/condition.h"
#include "mca/allocator/base/base.h"

View File

@ -3,6 +3,7 @@
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "ompi_config.h"
#include "include/types.h"
#include "mca/pml/base/pml_base_recvreq.h"

View File

@ -3,6 +3,7 @@
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "ompi_config.h"
#include "mca/pml/base/pml_base_request.h"
static void mca_pml_base_request_construct(mca_pml_base_request_t* req)

View File

@ -1,6 +1,7 @@
/*
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include "mca/pml/base/pml_base_sendreq.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include "ptl_base_comm.h"

View File

@ -3,6 +3,7 @@
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "ompi_config.h"
#include "class/ompi_list.h"
#include "mca/ptl/base/ptl_base_fragment.h"

View File

@ -4,6 +4,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <stdio.h>
#include "class/ompi_list.h"

View File

@ -3,6 +3,7 @@
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "ompi_config.h"
#include "mca/ptl/ptl.h"
#include "mca/ptl/base/ptl_base_recvfrag.h"
#include "mca/ptl/base/ptl_base_match.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include "mca/ptl/base/ptl_base_sendfrag.h"
static void mca_ptl_base_send_frag_construct(mca_ptl_base_send_frag_t* frag);

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include "util/output.h"
#include "util/if.h"

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <signal.h>
#include <unistd.h>
#include <stdio.h>

View File

@ -2,6 +2,7 @@
* $HEADER$
*/
#include "ompi_config.h"
#include <errno.h>
#include <unistd.h>
#include <string.h>

View File

@ -2,9 +2,7 @@
* $HEADER$
*/
#ifdef HAVE_CONFIG_H
#include "ompi_config.h"
#endif
#include <unistd.h>
#include <sys/types.h>