This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: locking.h
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: JimJoyce <jim at jimjoyce dot co dot uk>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 5 May 2013 18:30:15 +0100
- Subject: Re: locking.h
- References: <1367774484411-935826 dot post at n5 dot nabble dot com>
On 5 May 2013 18:21, JimJoyce wrote:
> Hi, I learnt and taught C programming many years ago,
> I'm now trying to resurect my skills, and have been using GCC for about a
> month.
> I've had no problems until this weekend.
> I'm failing to read a binary file which I can access quite successfully
> using Editors or Hex-Editors.
> However fread(), read() fscanf() etc. etc return nothing, not even an error
> message.
They can't return an error message because they return an integer.
What value are they returning?
How did you open the file? What did that call return?
> I'm beginning to wonder if the file is locked, So am trying to unlock it
> using 'int locking(int,int,long) '
> But GCC fails to find locking.h.
> I've tried #include <locking.h> and #include <sys\locking.h> to no avail.
N.B. Include paths should always use / not \ even on Windows,
otherwise you get problems with \t and \n in paths.
> I can find locking .h in C:\cygwin\usr\include, BUT is that where GCC looks?
You can check GCC's include paths by adding -v to the compilation command.