Unity-Technologies / qstat

New official qstat repository
Artistic License 2.0
121 stars 33 forks source link

here's a fix build for win 10 - I give up on this markdown and it wont accept patches GLHF #94

Closed serverlinkdev closed 3 years ago

serverlinkdev commented 4 years ago
$ diff -up qstat-2.14/qstat.h.orig qstat-2.14/qstat.h
--- qstat-2.14/qstat.h.orig     2014-02-28 20:49:37.000000000 -0500
+++ qstat-2.14/qstat.h  2020-03-07 13:18:39.979780400 -0500
@@ -50,7 +50,9 @@ static int gettimeofday(struct timeval *
 # ifndef EADDRINUSE
 #  define EADDRINUSE   WSAEADDRINUSE
 # endif
-# define snprintf _snprintf
+#if _MSC_VER < 1900
+#define snprintf _snprintf
+#endif
 #else
 # include <sys/time.h>
 # define SOCKET_ERROR -1
stevenh commented 4 years ago

The best way to do this is to put in a PR against the repo.

That way everything can be reviewed and tested and there's no need to fight with markdown ;-)

illwieckz commented 4 years ago

To put code in markdown you can add two surrounding ``` lines.

This way:

```
$ diff -up qstat-2.14/qstat.h.orig qstat-2.14/qstat.h
--- qstat-2.14/qstat.h.orig 2014-02-28 20:49:37.000000000 -0500
+++ qstat-2.14/qstat.h 2020-03-07 13:18:39.979780400 -0500
@@ -50,7 +50,9 @@ static int gettimeofday(struct timeval *
#ifndef EADDRINUSE
#define EADDRINUSE WSAEADDRINUSE
#endif
-#define snprintf _snprintf
+#if _MSC_VER < 1900
+#define snprintf _snprintf
+#endif
#else
#include <sys/time.h>
#define SOCKET_ERROR -1
```
stevenh commented 3 years ago

This is fixed in v2.16