At 09:33 2003-09-23 -0500, Bruce Vining <bvining@xxxxxxxxxx> wrote: > > > > > You need to be using the Integrated File System version of rename(). In > the V5R2 Information Center take the path Programming/APIs/APIs by > category/Unix-Type/Integrated File System APIs/rename() > > What is documented there is that if you define _POSIX_SOURCE you will get a > rename() which unlinks the "new" if it exists. > Ahh, thank you. Now I have compile-time problems on OS/400 V5R2. With _POSIX_SOURCE defined, <sys/types.h> a.k.a QSYSINC/SYS(TYPES) declines to define fd_set. <sys/time.h> a.k.a. QSYSINC/SYS(TIME) subsequently uses fd_set as a type identifier, and the compiler quite naturally chokes. I can work around this problem quite easily by changing the program to call Qp0lRenameUnlink() instead of rename(), but I wonder if there is some a way to fix this without making non-portable changes to the program. Or, is there some reason why a program should not try to include both <sys/types.h> and <sys/time.h>? On one hand, <sys/types.h> seems to be perfectly deliberate in omitting the definition of fd_set when _POSIX_SOURCE is defined. On the other hand, the documentation of select() in the iSeries information center <http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/ssele ct.htm> shows the need to #include both files. I have looked at "iSeries ILE C/C++ for iSeries Run-Time Library Functions, Version 5, SC41-5607-01", "OS/400 UNIX-Type APIs" <http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AM401/CCONTENTS>, the Posix site <http://www.opengroup.org/onlinepubs/007908799/>, and the iSeries information center for enlightenment about the definition of fd_set. Each of these shows lots of uses of fd_set as a type identifier, but I have not found much about the definition of fd_set. Thank you for your attention. Terry.
This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact