Rename all the win32 files to use the correct layer name.
This commit was SVN r32323.
Этот коммит содержится в:
родитель
de2cb71790
Коммит
85b89795ff
@ -2,27 +2,27 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
|
|
||||||
#include "opal/win32/ompi_inet.h"
|
#include "opal/win32/opal_inet.h"
|
||||||
#include "opal/util/output.h"
|
#include "opal/util/output.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* convert from presentation format (which usually means ASCII printable)
|
* convert from presentation format (which usually means ASCII printable)
|
||||||
* to network format (which is usually some kind of binary format).
|
* 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)
|
* 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)
|
* -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;
|
int addr_len;
|
||||||
struct sockaddr sa;
|
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.
|
* convert a network format address to presentation format.
|
||||||
*
|
*
|
||||||
* return:
|
* return:
|
||||||
* pointer to presentation format address (`dst'), or NULL.
|
* 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;
|
int addr_len;
|
||||||
struct sockaddr sa;
|
struct sockaddr sa;
|
||||||
DWORD str_len = size;
|
DWORD str_len = size;
|
||||||
struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
|
struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
|
||||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
|
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;
|
||||||
|
|
||||||
memset (&sa, 0, sizeof (struct sockaddr));
|
memset (&sa, 0, sizeof (struct sockaddr));
|
||||||
|
|
||||||
switch (af) {
|
switch (af) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
addr_len = sizeof(struct sockaddr_in);
|
addr_len = sizeof(struct sockaddr_in);
|
||||||
sin->sin_family = af;
|
sin->sin_family = af;
|
||||||
memcpy (&sin->sin_addr, src, sizeof (struct in_addr));
|
memcpy (&sin->sin_addr, src, sizeof (struct in_addr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
addr_len = sizeof(struct sockaddr_in6);
|
addr_len = sizeof(struct sockaddr_in6);
|
||||||
sin6->sin6_family = af;
|
sin6->sin6_family = af;
|
||||||
memcpy (&sin6->sin6_addr, src, sizeof (struct in6_addr));
|
memcpy (&sin6->sin6_addr, src, sizeof (struct in6_addr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
|
* Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
|
||||||
@ -16,21 +16,21 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_INET_H
|
#ifndef OPAL_INET_H
|
||||||
#define OMPI_INET_H
|
#define OPAL_INET_H
|
||||||
|
|
||||||
#include "opal_config.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
|
#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
|
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
|
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
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_MISC_H
|
#ifndef OPAL_MISC_H
|
||||||
#define OMPI_MISC_H
|
#define OPAL_MISC_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -108,4 +108,4 @@ static __inline int fcntl (int fildes, int cmd, ...) {
|
|||||||
return ret;
|
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
|
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
University Research and Technology
|
University Research and Technology
|
||||||
Corporation. All rights reserved.
|
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
|
of Tennessee Research Foundation. All rights
|
||||||
reserved.
|
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.
|
University of Stuttgart. All rights reserved.
|
||||||
Copyright (c) 2004-2005 The Regents of the University of California.
|
Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
$COPYRIGHT$
|
$COPYRIGHT$
|
||||||
|
|
||||||
Additional copyrights may follow
|
Additional copyrights may follow
|
||||||
|
|
||||||
$HEADER$
|
$HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
#include "win32/ompi_process.h"
|
#include "win32/opal_process.h"
|
||||||
|
|
||||||
pid_t waitpid(pid_t pid, int *status, int options) {
|
pid_t waitpid(pid_t pid, int *status, int options) {
|
||||||
return _cwait(status, pid, _WAIT_CHILD);
|
return _cwait(status, pid, _WAIT_CHILD);
|
@ -2,10 +2,10 @@
|
|||||||
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
*Copyright (c) 2004-2005 The Regents of the University of California.
|
*Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -16,14 +16,14 @@
|
|||||||
*$HEADER$
|
*$HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_PROCESS_H
|
#ifndef OPAL_PROCESS_H
|
||||||
#define OMPI_PROCESS_H
|
#define OPAL_PROCESS_H
|
||||||
|
|
||||||
#include "opal_config.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
|
#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
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
@ -33,4 +33,4 @@ OPAL_DECLSPEC int kill(pid_t pid, int sig) ;
|
|||||||
|
|
||||||
END_C_DECLS
|
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.
|
* University of Stuttgart. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
|
|
||||||
#include "opal/win32/ompi_socket.h"
|
#include "opal/win32/opal_socket.h"
|
||||||
#include "opal/util/output.h"
|
#include "opal/util/output.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -112,4 +112,4 @@ create_socketpair(int family, int type, int protocol, int fd[2])
|
|||||||
WSASetLastError(saved_errno);
|
WSASetLastError(saved_errno);
|
||||||
return -1;
|
return -1;
|
||||||
#undef ERR
|
#undef ERR
|
||||||
}
|
}
|
@ -8,14 +8,14 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_SOCKET_H
|
#ifndef OPAL_SOCKET_H
|
||||||
#define OMPI_SOCKET_H
|
#define OPAL_SOCKET_H
|
||||||
|
|
||||||
#include "opal_config.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
|
#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
|
BEGIN_C_DECLS
|
||||||
@ -24,4 +24,4 @@ OPAL_DECLSPEC int create_socketpair(int d, int type, int protocol, int sv[2]);
|
|||||||
|
|
||||||
END_C_DECLS
|
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
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
#include "opal/win32/ompi_time.h"
|
#include "opal/win32/opal_time.h"
|
||||||
|
|
||||||
#include<time.h>
|
#include<time.h>
|
||||||
|
|
@ -2,10 +2,10 @@
|
|||||||
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
*Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
*Copyright (c) 2004-2005 The Regents of the University of California.
|
*Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -16,14 +16,14 @@
|
|||||||
*$HEADER$
|
*$HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_TIME_H
|
#ifndef OPAL_TIME_H
|
||||||
#define OMPI_TIME_H
|
#define OPAL_TIME_H
|
||||||
|
|
||||||
#include "opal_config.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
|
#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_NONE 0 /* not on dst */
|
||||||
#define DST_USA 1 /* USA style dst */
|
#define DST_USA 1 /* USA style dst */
|
||||||
@ -155,8 +155,8 @@ struct clockinfo {
|
|||||||
#define TIMER_RELTIME 0x0 /* relative timer */
|
#define TIMER_RELTIME 0x0 /* relative timer */
|
||||||
#define TIMER_ABSTIME 0x1 /* absolute timer */
|
#define TIMER_ABSTIME 0x1 /* absolute timer */
|
||||||
|
|
||||||
#ifndef OMPI_TIMESPEC
|
#ifndef OPAL_TIMESPEC
|
||||||
#define OMPI_TIMESPEC
|
#define OPAL_TIMESPEC
|
||||||
struct timespec
|
struct timespec
|
||||||
{
|
{
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
@ -181,4 +181,4 @@ OPAL_DECLSPEC int gettimeofday (struct timeval *tv, struct timezone *tz);
|
|||||||
|
|
||||||
END_C_DECLS
|
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
|
Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
of Tennessee Research Foundation. All rights
|
of Tennessee Research Foundation. All rights
|
||||||
reserved.
|
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.
|
University of Stuttgart. All rights reserved.
|
||||||
Copyright (c) 2004-2005 The Regents of the University of California.
|
Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
$COPYRIGHT$
|
$COPYRIGHT$
|
||||||
|
|
||||||
Additional copyrights may follow
|
Additional copyrights may follow
|
||||||
|
|
||||||
$HEADER$
|
$HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
#include "opal/win32/ompi_uio.h"
|
#include "opal/win32/opal_uio.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Highly doubt if the windows sockets ever set errno to EAGAIN. There might
|
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
|
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 )
|
int writev( int fd, struct iovec * iov, int cnt )
|
@ -2,28 +2,28 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_UIO_H
|
#ifndef OPAL_UIO_H
|
||||||
#define OMPI_UIO_H
|
#define OPAL_UIO_H
|
||||||
|
|
||||||
#include "opal_config.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
|
#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 */
|
/* define the iovec structure */
|
||||||
struct iovec {
|
struct iovec {
|
||||||
@ -53,4 +53,4 @@ OPAL_DECLSPEC int readv (int fd, struct iovec *iov, int cnt);
|
|||||||
|
|
||||||
END_C_DECLS
|
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
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* 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.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_UTIL_H
|
#ifndef OPAL_UTIL_H
|
||||||
#define OMPI_UTIL_H
|
#define OPAL_UTIL_H
|
||||||
|
|
||||||
static __inline int getpagesize(void)
|
static __inline int getpagesize(void)
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
University Research and Technology
|
University Research and Technology
|
||||||
Corporation. All rights reserved.
|
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
|
of Tennessee Research Foundation. All rights
|
||||||
reserved.
|
reserved.
|
||||||
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
#include "opal/win32/ompi_utsname.h"
|
#include "opal/win32/opal_utsname.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This has to fill in the following information
|
This has to fill in the following information
|
||||||
@ -35,50 +35,50 @@ int uname( struct utsname *un )
|
|||||||
DWORD info_buf_count;
|
DWORD info_buf_count;
|
||||||
OSVERSIONINFO version_info;
|
OSVERSIONINFO version_info;
|
||||||
SYSTEM_INFO sys_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) {
|
if (0 == info_buf_count) {
|
||||||
snprintf( un->sysname, OMPI_UTSNAME_LEN, "Unknown" );
|
snprintf( un->sysname, OPAL_UTSNAME_LEN, "Unknown" );
|
||||||
} else {
|
} else {
|
||||||
/* remove the "OS=" from the beginning of the string */
|
/* 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)) {
|
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);
|
version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
if (!GetVersionEx(&version_info)) {
|
if (!GetVersionEx(&version_info)) {
|
||||||
snprintf(un->release, OMPI_UTSNAME_LEN, "undefined");
|
snprintf(un->release, OPAL_UTSNAME_LEN, "undefined");
|
||||||
snprintf(un->version, OMPI_UTSNAME_LEN, "undefined");
|
snprintf(un->version, OPAL_UTSNAME_LEN, "undefined");
|
||||||
} else {
|
} else {
|
||||||
/* fill in both release and version information */
|
/* 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.dwMajorVersion,
|
||||||
version_info.dwMinorVersion,
|
version_info.dwMinorVersion,
|
||||||
version_info.dwBuildNumber);
|
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 */
|
/* get machine information */
|
||||||
GetSystemInfo(&sys_info);
|
GetSystemInfo(&sys_info);
|
||||||
switch( sys_info.wProcessorArchitecture ) {
|
switch( sys_info.wProcessorArchitecture ) {
|
||||||
case PROCESSOR_ARCHITECTURE_UNKNOWN:
|
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;
|
break;
|
||||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
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;
|
break;
|
||||||
case PROCESSOR_ARCHITECTURE_IA64:
|
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;
|
break;
|
||||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
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;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
* Corporation. All rights reserved.
|
* 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
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
@ -16,23 +16,23 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OMPI_UTSNAME_H
|
#ifndef OPAL_UTSNAME_H
|
||||||
#define OMPI_UTSNAME_H
|
#define OPAL_UTSNAME_H
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
|
|
||||||
#define OMPI_UTSNAME_LEN 64
|
#define OPAL_UTSNAME_LEN 64
|
||||||
|
|
||||||
struct utsname {
|
struct utsname {
|
||||||
char sysname[OMPI_UTSNAME_LEN];
|
char sysname[OPAL_UTSNAME_LEN];
|
||||||
char nodename[OMPI_UTSNAME_LEN];
|
char nodename[OPAL_UTSNAME_LEN];
|
||||||
char release[OMPI_UTSNAME_LEN];
|
char release[OPAL_UTSNAME_LEN];
|
||||||
char version[OMPI_UTSNAME_LEN];
|
char version[OPAL_UTSNAME_LEN];
|
||||||
char machine[OMPI_UTSNAME_LEN];
|
char machine[OPAL_UTSNAME_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
OPAL_DECLSPEC int uname(struct utsname *un);
|
OPAL_DECLSPEC int uname(struct utsname *un);
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
#endif /* oMPI_UTSNAME_H */
|
#endif /* OPAL_UTSNAME_H */
|
Загрузка…
x
Ссылка в новой задаче
Block a user