Przemyslaw,

> 
> The only one modification in filesys.c which can interact with above
> is:
>    #if !defined( _XOPEN_SOURCE )
>    #  define _XOPEN_SOURCE 500
>    #endif
> at the beginning of this file.
> Please try to comment it and check if it helps.

Yes, it is it.

In my system I have them defined like this

#define S_IRWXU 0000700                 /* RWX mask for owner */
#define S_IRUSR 0000400                 /* R for owner */
#define S_IWUSR 0000200                 /* W for owner */
#define S_IXUSR 0000100                 /* X for owner */

#if __BSD_VISIBLE
#define S_IREAD         S_IRUSR
#define S_IWRITE        S_IWUSR
#define S_IEXEC         S_IXUSR
#endif

inside sys/stat.h

But if I include it and define __BSD_VISIBLE I get other errors.

So i did try to add to filesys.c only those defines and it seems to compile ok.

> If yes then we will have to find some workaround for OS2 builds.
> This define is necessary for pread[64]()/pwrite[64]() functions
> used in *nixes.

They are available, under the define __XSI_VISIBLE, inside unistd.h

I've added this also, so now what is needed is just a test to see if it works
as expected.

BTW, GCC on OS/2 has a lot of *nix posix functions available (through 
emulation).

> BTW I was looking at sth similar in OS2 API in the internet but
> I was not able to find anything. Probably for this platform we
> cannot enable file handle sharing in aliased work areas.
> 
No, there are no native OS/2 functions to move a file handle and read as a
single atomic operation.

We can use a mutex, though, to reach the same effect, I do understand that
this makes it more tedious to write the code and, if a single mutex is used,
it can affect scalability.

Best regards.

Maurilio.


> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to