projects
/
gssweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93ccf45
)
use _read() instead of read() on windows
author
Kevin Wasserman
<krwasserman@hotmail.com>
Tue, 6 Jan 2015 13:16:51 +0000
(08:16 -0500)
committer
Kevin Wasserman
<krwasserman@painless-security.com>
Thu, 15 Jan 2015 19:34:15 +0000
(14:34 -0500)
json_gssapi/main.cpp
patch
|
blob
|
history
diff --git
a/json_gssapi/main.cpp
b/json_gssapi/main.cpp
index
fb7f28a
..
be5f227
100644
(file)
--- a/
json_gssapi/main.cpp
+++ b/
json_gssapi/main.cpp
@@
-1,15
+1,20
@@
//
#include <iostream>
//
#include <iostream>
+#include <string.h>
#ifdef WIN32
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#else
#include <unistd.h>
#ifdef WIN32
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#else
#include <unistd.h>
-#include <string.h>
#endif
#include <GSSRequest.h>
#endif
#include <GSSRequest.h>
+#ifdef WIN32
+#define gssweb_read _read
+#else
+#define gssweb_read read
+#endif
using std::cin;
using std::cout;
using std::cin;
using std::cout;
@@
-38,7
+43,7
@@
int main(int argc, char **argv) {
readThisRound = readTotal = 0;
while(4 != readTotal)
{
readThisRound = readTotal = 0;
while(4 != readTotal)
{
- readThisRound = _read(0, ((&len) + readTotal), 4 - readTotal);
+ readThisRound =
gssweb
_read(0, ((&len) + readTotal), 4 - readTotal);
readTotal += readThisRound;
}
readTotal += readThisRound;
}
@@
-48,7
+53,7
@@
int main(int argc, char **argv) {
while (readTotal < len)
{
readRemaining = len - readTotal;
while (readTotal < len)
{
readRemaining = len - readTotal;
- readThisRound = _read( 0, &(input[readTotal]), readRemaining);
+ readThisRound =
gssweb
_read( 0, &(input[readTotal]), readRemaining);
if (-1 == readThisRound)
break;
else
if (-1 == readThisRound)
break;
else