projects
/
openwrt-10.03
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[backfire] tools: update Makefile after r25735-r25741
[openwrt-10.03/.git]
/
tools
/
include
/
getline.h
diff --git
a/tools/include/getline.h
b/tools/include/getline.h
index 219be752049fa9f8e15287782f4b38cbd7c01e63..b9a3f7150fd792e9007a8303d35ab009f12df05e 100644
(file)
--- a/
tools/include/getline.h
+++ b/
tools/include/getline.h
@@
-40,10
+40,16
@@
static inline ssize_t
getline(char **outbuf, size_t *outsize, FILE *fp)
{
static inline ssize_t
getline(char **outbuf, size_t *outsize, FILE *fp)
{
- char *buf;
size_t len;
size_t len;
+#ifndef __CYGWIN__
+ char *buf;
buf = fgetln(fp, &len);
buf = fgetln(fp, &len);
+#else
+ char buf[512];
+ fgets(buf, sizeof(buf), fp);
+ len = strlen(buf);
+#endif
if (buf == NULL)
return (-1);
if (buf == NULL)
return (-1);