title: Problems compiliing c++ code using cygwin
body: <p>I am trying to compile some source code in cygwin (in windows 7)
  and get the following error when I run the make file</p>
  
  <pre><code>g++ -DHAVE_CONFIG_H -I. -I..  -I..  -Wall -Wextra -Werror -g -O2 -MT libcommon_a  Fcntl.o -MD -MP -MF .deps/libcommon_a-Fcntl.Tpo -c -o libcommon_a-Fcntl.o `test -f 'Fcntl.cpp' || echo './'`Fcntl.cpp
  Fcntl.cpp: In function int setCloexec(int):
  Fcntl.cpp:8: error: 'F_GETFD' was not declared in this scope
  Fcntl.cpp:8: error: 'fcntl' was not declared in this scope
  Fcntl.cpp:11: error: 'FD_CLOEXEC' was not declared in this scope
  Fcntl.cpp:12: error: 'F_SETFD' was not declared in this scope
  make[4]: *** [libcommon_a-Fcntl.o] Error 1
  make[4]: Leaving directory `/abyss-1.1.2/Common'
  make[3]: *** [all-recursive] Error 1
  make[3]: Leaving directory `/abyss-1.1.2'
  make[2]: *** [all] Error 2
  make[2]: Leaving directory `/abyss-1.1.2'
  make[1]: *** [.build-conf] Error 2
  make[1]: Leaving directory `/cygdrive/c/Users/Martin/Documents/NetBeansProjects/abyss-1.1.2_1'
  make: *** [.build-impl] Error 2
  </code></pre>
  
  <p>The problem file is:-</p>
  
  <pre><code>#include "Fcntl.h"
  #include &lt;fcntl.h&gt;
  
  
  /* Set the FD_CLOEXEC flag of the specified file descriptor. */
  int setCloexec(int fd)
  {
   int flags = fcntl(fd, F_GETFD, 0);
   if (flags == -1)
    return -1;
   flags |= FD_CLOEXEC;
   return fcntl(fd, F_SETFD, flags);
  }
  </code></pre>
  
  <p>I don't understand what is going on,
  the file fcntl.h is available and the varaiables that it says were not declared in this scope
  do not give an error when I compile the file on its own</p>
  
  <p>Any help would be much appreciated</p>
  
  <p>Many Thanks</p>