1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
/* $Id: pvmwin.h,v 1.2 1999/01/19 17:26:41 pvmsrc Exp $ */
/*
* PVM version 3.4: Parallel Virtual Machine System
* University of Tennessee, Knoxville TN.
* Oak Ridge National Laboratory, Oak Ridge TN.
* Emory University, Atlanta GA.
* Authors: J. J. Dongarra, G. E. Fagg, M. Fischer,
* G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
* P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
* (C) 1997 All Rights Reserved
*
* NOTICE
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted
* provided that the above copyright notice appear in all copies and
* that both the copyright notice and this permission notice appear in
* supporting documentation.
*
* Neither the Institutions (Emory University, Oak Ridge National
* Laboratory, and University of Tennessee) nor the Authors make any
* representations about the suitability of this software for any
* purpose. This software is provided ``as is'' without express or
* implied warranty.
*
* PVM version 3 was funded in part by the U.S. Department of Energy,
* the National Science Foundation and the State of Tennessee.
*/
/* cruft file for different compiler specifications
* like Watcom, Visual, Borland ...
*
* added __fortran stub 06/21/1997 Fischer
*/
#ifdef WIN32
#define __fortran __stdcall
#endif
#define STRICT
#include <sys/timeb.h>
#include <time.h>
#include <process.h>
#include <winsock.h>
#include <windows.h>
/* WIN32 gets stdarg.h via pvm3.h -> pvmwin.h -> windows.h
nice coding trail - NOT...
since WIN32 is not a __STDC__ environment - it needs varargs.h
so, this will cleanup the incorrect include order for var args
from windows.h first must remove va_start va_end to avoid compiler
warnings... Someone else must then include the varargs.h file
or that will then cause error.
uggghhhhh... this is ugly coding at its best
*/
#ifdef WIN32
#undef va_start
#undef va_end
#endif
#include <stdio.h>
#include <io.h>
#ifndef HASSTDLIB
#define HASSTDLIB
#endif
#ifndef SYSVBFUNC
#define SYSVBFUNC
#endif
#ifndef SYSVSTR
#define SYSVSTR
#endif
#ifndef HASERRORVARS
#define HASERRORVARS
#endif
#ifndef NOWAIT3
#define NOWAIT3
#endif
#ifndef NOGETDTBLSIZ
#define NOGETDTBLSIZ
#endif
#ifndef ARCHCLASS
#define ARCHCLASS "WIN32"
#endif
#ifndef NOUNIXDOM
#define NOUNIXDOM
#endif
#ifndef NOTMPNAM
#define NOTMPNAM
#endif
#ifndef HASERRORVARS
#define HASERRORVARS
#endif
/* sys/param.h doesn't exist: */
#define MAXHOSTNAMELEN 64
#define MAXPATHLEN 64
#ifndef TIME
#define TIME
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif
/* to keep the compiler satisfied */
extern int gettimeofday(struct timeval *, struct timezone *);
extern char *MyGetUserName();
extern int kill(int,int, int);
extern HANDLE win32_open_file( char *);
extern HANDLE win32_create_file(char *s, int );
extern int win32_close_file(HANDLE);
extern int win32_write_file(HANDLE,char *,int);
extern int win32_read_file(HANDLE,char *, int);
extern int win32_write_socket (SOCKET, const char FAR *, int);
extern int win32_read_socket (SOCKET, char FAR *, int);
extern void Wait(HANDLE id, DWORD *prv);
|