Just as a matter of clarification, these calls return some status, don't they? int bytes_read=read(fd,buf,count_attempted); printf("Requested %d bytes, read %d bytes\n",count_attempted,bytes_read); if (bytes_read<0) { // do something } ? And i think next in line after some simple diagnostics is to fire up gdb. my 2 cents only. dan On Sun, May 5, 2013 at 10:21 AM, JimJoyce <jim@xxxxxxxxxxxxxx> 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. > 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. > I can find locking .h in C:\cygwin\usr\include, BUT is that where GCC looks? > > OR can anyone suggest some other reasons why my 'reads' are failingl? > > Please - Help me! I'm drowning! > > JJ > > > > > > -- > View this message in context: http://gcc.1065356.n5.nabble.com/locking-h-tp935826.html > Sent from the gcc - Help mailing list archive at Nabble.com.