All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
File Name created by temnam not accessable under Windows
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
File Name created by temnam not accessable under Windows - Apr. 1, '03, 1:22:02 PM
|
|
|
sharon
Posts: 11
Joined: Sep. 9, '02,
Status: offline
|
We have an application that runs both on Solaris and Interix platforms. We are using SFU 3 for our Interix platform. Our code uses the tempnam() function to create temporary file names for many purposes, one of which is for ftp. I have found that tempnam() sometimes creates file names with a " ." at the end. This is fine on the Interix side but the Windows side seems to have problems with this. We use the Windows ftp server (because we need anonymous ftp access) and it can not access these files with a " ." at the end (you get an error " The system cannot find the file specified." ).
How does tempnam() form a temporary name? This does not seem to happen very often, but when it does, our application is severely impacted. Any ideas? I realize I can add #ifdef __INTERIX around any tempnam() calls and check for " ." but was hoping to avoid this.
|
|
|
RE: File Name created by temnam not accessable under Wi... - Apr. 1, '03, 2:44:30 PM
|
|
|
markfunk
Posts: 670
Joined: Mar. 31, '03,
Status: online
|
tempnam() calls mktemp()
And mktemp() uses a-z, A-Z, ., - and _ chars in the temp file name.
You can do as you suggest with the #ifdef, or you could introduce your own version of mktemp() which doesn' t have this behaviour.
To do this, you are going to have to replace all the functions found in Interix' s mktemp.o from /usr/lib/libc.a library file.
Perhaps the source from ftp.openbsd.org or ftp.freebsd.com might work for you.
mark
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|