When to use Cygwin or MinGW to compile C code?
I'm wondering in what situations one uses Cygwin to compile C code and when one would opt for MinGW. I came over http://stackoverflow.com/questions/771756/what-is-the-difference-between-cygwin-and-mingw describing the differences between Cygwin and MinGW.

As far as I understood, one could say the following:

 - Cygwin: Allows compiling C source code for POSIX compliant operating systems to run on Windows (requires the cygwin1.dll). For example, I could compile an application using the pthreads API for Windows, although Windows itself does not implement the API.
 - MinGW: Allows compiling Windows compliant C source code. So using the example from above, I could not use the pthreads API when compiling with gcc in MinGW but would be required to use the threads API offered by Windows. Instead of using the MinGW gcc compiler, I could also be using a different compiler, e.g. the one that comes with VC++.

However, my understanding seems to be wrong, because I was able to compile a dummy program that included pthread.h with MinGW. What did I understand wrongly?
When to use Cygwin or MinGW to compile C code?
===

I'm wondering in what situations one uses Cygwin to compile C code and when one would opt for MinGW. I came over http://stackoverflow.com/questions/771756/what-is-the-difference-between-cygwin-and-mingw describing the differences between Cygwin and MinGW.

As far as I understood, one could say the following:

 - Cygwin: Allows compiling C source code for POSIX compliant operating systems to run on Windows (requires the cygwin1.dll). For example, I could compile an application using the pthreads API for Windows, although Windows itself does not implement the API.
 - MinGW: Allows compiling Windows compliant C source code. So using the example from above, I could not use the pthreads API when compiling with gcc in MinGW but would be required to use the threads API offered by Windows. Instead of using the MinGW gcc compiler, I could also be using a different compiler, e.g. the one that comes with VC++.

However, my understanding seems to be wrong, because I was able to compile a dummy program that included pthread.h with MinGW. What did I understand wrongly?