This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: locking.h


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]