]> granicus.if.org Git - curl/commit
docs/examples/httpput.c: fix build for MSVC
authorGisle Vanem <gvanem@yahoo.no>
Thu, 24 Oct 2013 13:21:16 +0000 (15:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 27 Oct 2013 14:48:57 +0000 (15:48 +0100)
commit6fe619be7a5e6c04b8f558f07de48ecffcb21c64
treebae3bb27113e15207a5db3b065ca9a2fac6971b7
parent1e39b95682781fd9117eef094f6fd8c58b443610
docs/examples/httpput.c: fix build for MSVC

"Dan Fandrich" <dan@coneharvesters.com> wrote:

>> But I'm not sure <unistd.h> is needed at all.
>
> It's needed for close(2). But the only reason that's needed is because fstat
> is used instead of stat(2); if you fix that, then you could remove that
> include altogether.

Okay. I've tested the following with MSVC and MingW. htttput.c now
simply uses stat():
docs/examples/httpput.c