On 16 September 2013 00:34, Ariel Constenla-Haile <arie...@apache.org>wrote:
> On Sun, Sep 15, 2013 at 03:28:06PM +0200, janI wrote: > > I have investigated a bit further: > > > > At the top of gCon.cxx you find: > > > > #ifdef _WIN32 #include <io.h> #include <direct.h> #define > > OS_ACCESS(x,y) _access(x,y) #define OS_MKDIR(x) _mkdir(x) #else > > #include <sys/stat.h> #include <sys/types.h> #define OS_ACCESS(x,y) > > access(x,y) #define OS_MKDIR(x) mkdir(x,0777) #endif > > > > > > function "access" is normally defined in sys/stat.h on linux. > > This does not seem to be the case; try man 2 access > > NAME > access - check real user's permissions for a file > > SYNOPSIS > #include <unistd.h> > > int access(const char *pathname, int mode); > > > And the following dummy code does not compile: > > #include <sys/stat.h> > > int main(void) > { > const char dummy[] = ""; > int n = access( dummy, F_OK ); > > return 0; > } > > > > You need to see in which include file access is defined on your > > system, and either add an #ifdef for your system, or extend the > > include files. > > You should try to avoid all that system calls, the URE libraries have > a system abstraction layer to write portable code; vid. > http://www.openoffice.org/api/docs/cpp/ref/names/index.html > > > Regards > -- > Ariel Constenla-Haile > La Plata, Argentina >