http://bugs.winehq.org/show_bug.cgi?id=14393
--- Comment #4 from Joël Bohnes shino@jenux.homelinux.org 2008-07-17 18:45:45 --- Well that's why cygwin is there - to get the same results as under linux. The executable you built uses glibc and therefore you get this result. Your application won't run without cygwin, or at least, without the 'cygwin.dll'.
You can tell gcc that you don't want to build a cygwin exectuable but a native windows appliction by adding the '-mno-cygwin' parameter.
So compile the source like this: 'gcc foo.c -mno-cygwin -lwsock32', run the resulting exe and you'll see the difference.