1
1

Rename all the win32 files to use the correct layer name.

This commit was SVN r32323.
Этот коммит содержится в:
George Bosilca 2014-07-26 20:17:09 +00:00
родитель de2cb71790
Коммит 85b89795ff
14 изменённых файлов: 111 добавлений и 111 удалений

Просмотреть файл

@ -2,27 +2,27 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/
#include "opal_config.h"
#include "opal/win32/ompi_inet.h"
#include "opal/win32/opal_inet.h"
#include "opal/util/output.h"
/*
/*
* convert from presentation format (which usually means ASCII printable)
* to network format (which is usually some kind of binary format).
*
@ -31,7 +31,7 @@
* 0 if the address wasn't valid (`dst' is untouched in this case)
* -1 if some other error occurred (`dst' is untouched in this case, too)
*/
int ompi_inet_pton(int af, const char *src, void *dst)
int opal_inet_pton(int af, const char *src, void *dst)
{
int addr_len;
struct sockaddr sa;
@ -71,33 +71,33 @@ int ompi_inet_pton(int af, const char *src, void *dst)
}
/*
/*
* convert a network format address to presentation format.
*
* return:
* pointer to presentation format address (`dst'), or NULL.
*/
const char *ompi_inet_ntop(int af, const void *src, char *dst, size_t size)
const char *opal_inet_ntop(int af, const void *src, char *dst, size_t size)
{
int addr_len;
struct sockaddr sa;
DWORD str_len = size;
struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
memset (&sa, 0, sizeof (struct sockaddr));
switch (af) {
case AF_INET:
addr_len = sizeof(struct sockaddr_in);
sin->sin_family = af;
memcpy (&sin->sin_addr, src, sizeof (struct in_addr));
sin->sin_family = af;
memcpy (&sin->sin_addr, src, sizeof (struct in_addr));
break;
case AF_INET6:
addr_len = sizeof(struct sockaddr_in6);
sin6->sin6_family = af;
memcpy (&sin6->sin6_addr, src, sizeof (struct in6_addr));
sin6->sin6_family = af;
memcpy (&sin6->sin6_addr, src, sizeof (struct in6_addr));
break;
default:

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
@ -16,21 +16,21 @@
* $HEADER$
*/
#ifndef OMPI_INET_H
#define OMPI_INET_H
#ifndef OPAL_INET_H
#define OPAL_INET_H
#include "opal_config.h"
#ifndef OMPI_WIN_COMPAT_H
#ifndef OPAL_WIN_COMPAT_H
#error This file is supposed to be included only from win_compat.h
#endif /* OMPI_WIN_COMPAT_H */
#endif /* OPAL_WIN_COMPAT_H */
BEGIN_C_DECLS
OPAL_DECLSPEC int ompi_inet_pton(int af, const char *src, void *dst);
OPAL_DECLSPEC int opal_inet_pton(int af, const char *src, void *dst);
OPAL_DECLSPEC const char *ompi_inet_ntop(int af, const void *src, char *dst, size_t size);
OPAL_DECLSPEC const char *opal_inet_ntop(int af, const void *src, char *dst, size_t size);
END_C_DECLS
#endif /* OMPI_INET_H */
#endif /* OPAL_INET_H */

Просмотреть файл

@ -2,22 +2,22 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/
#ifndef OMPI_MISC_H
#define OMPI_MISC_H
#ifndef OPAL_MISC_H
#define OPAL_MISC_H
#include <stdio.h>
#include <stdlib.h>
@ -108,4 +108,4 @@ static __inline int fcntl (int fildes, int cmd, ...) {
return ret;
}
#endif /* OMPI_MISC_H */
#endif /* OPAL_MISC_H */

Просмотреть файл

@ -2,22 +2,22 @@
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
University Research and Technology
Corporation. All rights reserved.
Copyright (c) 2004-2005 The University of Tennessee and The University
Copyright (c) 2004-2014 The University of Tennessee and The University
of Tennessee Research Foundation. All rights
reserved.
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
University of Stuttgart. All rights reserved.
Copyright (c) 2004-2005 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
*/
#include "opal_config.h"
#include "win32/ompi_process.h"
#include "win32/opal_process.h"
pid_t waitpid(pid_t pid, int *status, int options) {
return _cwait(status, pid, _WAIT_CHILD);

Просмотреть файл

@ -2,10 +2,10 @@
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
*Copyright (c) 2004-2005 The University of Tennessee and The University
*Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
*Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
*Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
*Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
@ -16,14 +16,14 @@
*$HEADER$
*/
#ifndef OMPI_PROCESS_H
#define OMPI_PROCESS_H
#ifndef OPAL_PROCESS_H
#define OPAL_PROCESS_H
#include "opal_config.h"
#ifndef OMPI_WIN_COMPAT_H
#ifndef OPAL_WIN_COMPAT_H
#error This file is supposed to be included only from win_compat.h
#endif /* OMPI_WIN_COMPAT_H */
#endif /* OPAL_WIN_COMPAT_H */
BEGIN_C_DECLS
@ -33,4 +33,4 @@ OPAL_DECLSPEC int kill(pid_t pid, int sig) ;
END_C_DECLS
#endif /* OMPI_PROCESS_H */
#endif /* OPAL_PROCESS_H */

Просмотреть файл

@ -1,16 +1,16 @@
/*
* Copyright (c) 2010 High Performance Computing Center Stuttgart,
* Copyright (c) 2010 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/
#include "opal_config.h"
#include "opal/win32/ompi_socket.h"
#include "opal/win32/opal_socket.h"
#include "opal/util/output.h"
int
@ -112,4 +112,4 @@ create_socketpair(int family, int type, int protocol, int fd[2])
WSASetLastError(saved_errno);
return -1;
#undef ERR
}
}

Просмотреть файл

@ -8,14 +8,14 @@
* $HEADER$
*/
#ifndef OMPI_SOCKET_H
#define OMPI_SOCKET_H
#ifndef OPAL_SOCKET_H
#define OPAL_SOCKET_H
#include "opal_config.h"
#ifndef OMPI_WIN_COMPAT_H
#ifndef OPAL_WIN_COMPAT_H
#error This file is supposed to be included only from win_compat.h
#endif /* OMPI_WIN_COMPAT_H */
#endif /* OPAL_WIN_COMPAT_H */
BEGIN_C_DECLS
@ -24,4 +24,4 @@ OPAL_DECLSPEC int create_socketpair(int d, int type, int protocol, int sv[2]);
END_C_DECLS
#endif /* OMPI_SOCKET_H */
#endif /* OPAL_SOCKET_H */

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -17,7 +17,7 @@
*/
#include "opal_config.h"
#include "opal/win32/ompi_time.h"
#include "opal/win32/opal_time.h"
#include<time.h>

Просмотреть файл

@ -2,10 +2,10 @@
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
*Copyright (c) 2004-2005 The University of Tennessee and The University
*Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
*Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
*Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
*Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
@ -16,14 +16,14 @@
*$HEADER$
*/
#ifndef OMPI_TIME_H
#define OMPI_TIME_H
#ifndef OPAL_TIME_H
#define OPAL_TIME_H
#include "opal_config.h"
#ifndef OMPI_WIN_COMPAT_H
#ifndef OPAL_WIN_COMPAT_H
#error This file is supposed to be included only from win_compat.h
#endif /* OMPI_WIN_COMPAT_H */
#endif /* OPAL_WIN_COMPAT_H */
#define DST_NONE 0 /* not on dst */
#define DST_USA 1 /* USA style dst */
@ -155,8 +155,8 @@ struct clockinfo {
#define TIMER_RELTIME 0x0 /* relative timer */
#define TIMER_ABSTIME 0x1 /* absolute timer */
#ifndef OMPI_TIMESPEC
#define OMPI_TIMESPEC
#ifndef OPAL_TIMESPEC
#define OPAL_TIMESPEC
struct timespec
{
long tv_sec;
@ -181,4 +181,4 @@ OPAL_DECLSPEC int gettimeofday (struct timeval *tv, struct timezone *tz);
END_C_DECLS
#endif /* OMPI_TIME_H */
#endif /* OPAL_TIME_H */

Просмотреть файл

@ -5,25 +5,25 @@
Copyright (c) 2004-2005 The University of Tennessee and The University
of Tennessee Research Foundation. All rights
reserved.
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
University of Stuttgart. All rights reserved.
Copyright (c) 2004-2005 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
*/
#include "opal_config.h"
#include "opal/win32/ompi_uio.h"
#include "opal/win32/opal_uio.h"
#include <errno.h>
/*
Highly doubt if the windows sockets ever set errno to EAGAIN. There might
be some weird conversion to map this or I might have to rewrite this piece
of code to handle the windows error flags
of code to handle the windows error flags
*/
int writev( int fd, struct iovec * iov, int cnt )

Просмотреть файл

@ -2,28 +2,28 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/
#ifndef OMPI_UIO_H
#define OMPI_UIO_H
#ifndef OPAL_UIO_H
#define OPAL_UIO_H
#include "opal_config.h"
#ifndef OMPI_WIN_COMPAT_H
#ifndef OPAL_WIN_COMPAT_H
#error This file is supposed to be included only from win_compat.h
#endif /* OMPI_WIN_COMPAT_H */
#endif /* OPAL_WIN_COMPAT_H */
/* define the iovec structure */
struct iovec {
@ -53,4 +53,4 @@ OPAL_DECLSPEC int readv (int fd, struct iovec *iov, int cnt);
END_C_DECLS
#endif /* OMPI_UIO_H */
#endif /* OPAL_UIO_H */

Просмотреть файл

@ -2,22 +2,22 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/
#ifndef OMPI_UTIL_H
#define OMPI_UTIL_H
#ifndef OPAL_UTIL_H
#define OPAL_UTIL_H
static __inline int getpagesize(void)
{

Просмотреть файл

@ -2,7 +2,7 @@
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
University Research and Technology
Corporation. All rights reserved.
Copyright (c) 2004-2005 The University of Tennessee and The University
Copyright (c) 2004-2014 The University of Tennessee and The University
of Tennessee Research Foundation. All rights
reserved.
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -17,7 +17,7 @@
*/
#include "opal_config.h"
#include "opal/win32/ompi_utsname.h"
#include "opal/win32/opal_utsname.h"
/*
This has to fill in the following information
@ -35,50 +35,50 @@ int uname( struct utsname *un )
DWORD info_buf_count;
OSVERSIONINFO version_info;
SYSTEM_INFO sys_info;
TCHAR info_buf[OMPI_UTSNAME_LEN];
TCHAR info_buf[OPAL_UTSNAME_LEN];
info_buf_count = ExpandEnvironmentStrings( env_variable, info_buf, OMPI_UTSNAME_LEN);
info_buf_count = ExpandEnvironmentStrings( env_variable, info_buf, OPAL_UTSNAME_LEN);
if (0 == info_buf_count) {
snprintf( un->sysname, OMPI_UTSNAME_LEN, "Unknown" );
snprintf( un->sysname, OPAL_UTSNAME_LEN, "Unknown" );
} else {
/* remove the "OS=" from the beginning of the string */
strncpy( un->sysname, info_buf + 3, OMPI_UTSNAME_LEN );
strncpy( un->sysname, info_buf + 3, OPAL_UTSNAME_LEN );
}
info_buf_count = OMPI_UTSNAME_LEN;
info_buf_count = OPAL_UTSNAME_LEN;
if (!GetComputerName( un->nodename, &info_buf_count)) {
snprintf(un->nodename, OMPI_UTSNAME_LEN, "undefined");
snprintf(un->nodename, OPAL_UTSNAME_LEN, "undefined");
}
version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (!GetVersionEx(&version_info)) {
snprintf(un->release, OMPI_UTSNAME_LEN, "undefined");
snprintf(un->version, OMPI_UTSNAME_LEN, "undefined");
snprintf(un->release, OPAL_UTSNAME_LEN, "undefined");
snprintf(un->version, OPAL_UTSNAME_LEN, "undefined");
} else {
/* fill in both release and version information */
snprintf( un->release, OMPI_UTSNAME_LEN, "%d.%d.%d",
snprintf( un->release, OPAL_UTSNAME_LEN, "%d.%d.%d",
version_info.dwMajorVersion,
version_info.dwMinorVersion,
version_info.dwBuildNumber);
snprintf( un->version, OMPI_UTSNAME_LEN, "%s", version_info.szCSDVersion );
snprintf( un->version, OPAL_UTSNAME_LEN, "%s", version_info.szCSDVersion );
}
/* get machine information */
GetSystemInfo(&sys_info);
switch( sys_info.wProcessorArchitecture ) {
case PROCESSOR_ARCHITECTURE_UNKNOWN:
snprintf( un->machine, OMPI_UTSNAME_LEN, "Unknown %d", sys_info.wProcessorLevel );
snprintf( un->machine, OPAL_UTSNAME_LEN, "Unknown %d", sys_info.wProcessorLevel );
break;
case PROCESSOR_ARCHITECTURE_INTEL:
snprintf( un->machine, OMPI_UTSNAME_LEN, "Intel %d", sys_info.wProcessorLevel );
snprintf( un->machine, OPAL_UTSNAME_LEN, "Intel %d", sys_info.wProcessorLevel );
break;
case PROCESSOR_ARCHITECTURE_IA64:
snprintf( un->machine, OMPI_UTSNAME_LEN, "IA64 %d", sys_info.wProcessorLevel );
snprintf( un->machine, OPAL_UTSNAME_LEN, "IA64 %d", sys_info.wProcessorLevel );
break;
case PROCESSOR_ARCHITECTURE_AMD64:
snprintf( un->machine, OMPI_UTSNAME_LEN, "AMD %d", sys_info.wProcessorLevel );
snprintf( un->machine, OPAL_UTSNAME_LEN, "AMD %d", sys_info.wProcessorLevel );
break;
default:
snprintf( un->machine, OMPI_UTSNAME_LEN, "UFO hardware %d", sys_info.wProcessorLevel );
snprintf( un->machine, OPAL_UTSNAME_LEN, "UFO hardware %d", sys_info.wProcessorLevel );
break;
}

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* Copyright (c) 2004-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -16,23 +16,23 @@
* $HEADER$
*/
#ifndef OMPI_UTSNAME_H
#define OMPI_UTSNAME_H
#ifndef OPAL_UTSNAME_H
#define OPAL_UTSNAME_H
#include "opal_config.h"
#define OMPI_UTSNAME_LEN 64
#define OPAL_UTSNAME_LEN 64
struct utsname {
char sysname[OMPI_UTSNAME_LEN];
char nodename[OMPI_UTSNAME_LEN];
char release[OMPI_UTSNAME_LEN];
char version[OMPI_UTSNAME_LEN];
char machine[OMPI_UTSNAME_LEN];
char sysname[OPAL_UTSNAME_LEN];
char nodename[OPAL_UTSNAME_LEN];
char release[OPAL_UTSNAME_LEN];
char version[OPAL_UTSNAME_LEN];
char machine[OPAL_UTSNAME_LEN];
};
BEGIN_C_DECLS
OPAL_DECLSPEC int uname(struct utsname *un);
END_C_DECLS
#endif /* oMPI_UTSNAME_H */
#endif /* OPAL_UTSNAME_H */