[ofw] OpenSM patches for saquery porting - 2 of 6 patches.
Smith, Stan
stan.smith at intel.com
Fri Jan 30 14:50:18 PST 2009
Signed off by stan.smith at intel.com
diff U3 C:/Documents and Settings/scsmith/Local Settings/Temp/winosm_common.h-revBASE.svn001.tmp.h C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/trunk/ulp/opensm/user/include/vendor/winosm_common.h
--- C:/Documents and Settings/scsmith/Local Settings/Temp/winosm_common.h-revBASE.svn001.tmp.h Fri Jan 30 14:15:28 2009
+++ C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/trunk/ulp/opensm/user/include/vendor/winosm_common.h Fri Jan 30 14:15:50 2009
@@ -21,6 +21,8 @@
# define no_argument 0
# define required_argument 1
# define optional_argument 2
+
+#ifndef _GETOPT_H_
/* Global variables for getopt_long */
char *optarg;
/*
@@ -36,6 +38,7 @@
int *flag;
int val;
};
+#endif
/************************************************************************/
@@ -43,11 +46,14 @@
get_char_option(const char* optstring,
char*const* argv,int argc,
int iArg, int* opt_ind,char* opt_p);
+
int
getopt_long_only(int argc, char *const*argv,
const char *optstring,
const struct option *longopts, int *longindex);
/**************************************************************************/
+
+
static __inline
void FileTimeToTimeval(LPFILETIME pft, struct timeval * ptv)
{ /* Note that LONGLONG is a 64-bit value */
@@ -162,9 +168,10 @@
/*****************************************************************************/
-
-
+#ifndef getpid
#define getpid() GetCurrentProcessId()
+#endif
+
#define sleep(sec) SleepEx((sec)*1000,TRUE)
#define usleep(usec) SleepEx(usec/1000,TRUE)
//#define MT_ALIGN8 __declspec(align(8))
@@ -172,7 +179,11 @@
#ifndef ETIMEDOUT
#define ETIMEDOUT (10060)
#endif
+
+#ifndef strtoull
#define strtoull _strtoui64
+#endif
+
#define OSM_MAX_LOG_NAME_SIZE 2048
#define unlink(str) _unlink(str)
#define strnicmp _strnicmp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winosm_common.h.patch
Type: application/octet-stream
Size: 1992 bytes
Desc: winosm_common.h.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090130/c4e5e3cf/attachment.obj>
More information about the ofw
mailing list