Monday, 7 May 2012

[gccsdk] [Bug 238] New: Temporary filenames with RISC OS filename semantics

http://www.riscos.info/bugzilla3/show_bug.cgi?id=238

Summary: Temporary filenames with RISC OS filename semantics
Product: GCC/GCCSDK
Version: other
Platform: Other
OS/Version: RISC OS
Status: NEW
Severity: normal
Priority: P1
Component: C compiler
AssignedTo: John.Tytgat@aaug.net
ReportedBy: duncan_moore@ntlworld.com
Estimated Hours: 0.0


GCCSDK GCC 4.1.2 Release 2 Development 2012-05-05
VRPC RISC OS 4.39

#include <stdio.h> // printf
#include <stdlib.h> // getenv
#include <unistd.h> // sleep
#include <unixlib/local.h> // __riscosify_control
int __riscosify_control;

//---------------------------------------------------------------------------
int main(void) {
__riscosify_control|=__RISCOSIFY_NO_PROCESS; // RISC OS names

printf("%s\n",tmpnam(NULL));
printf("%s\n",tempnam(getenv("Wimp$ScrapDir"),"pip"));

FILE* tt=tmpfile();
fprintf(tt,"eee\n");
sleep(5);

return 0;
}

This program is using RISC OS filename semantics, but the temporary file
functions all ignore this, giving:

*test
/tmp/__8lbs5c
HostFS::HardDisc4.$.!boot.Resources.!Scrap.ScrapDirs.IDdisabled/pip8lbs5c
*

I would expect something more like:

*test
<Wimp$ScrapDir>.__8lbs5c
HostFS::HardDisc4.$.!boot.Resources.!Scrap.ScrapDirs.IDdisabled.pip8lbs5c
*

Note that tempnam() used '/' as the directory separator, and not '.'.

Also, tmpfile() creates a temporary file in CSD with a name like:

/tmp/__8lbs5c

--
Configure bugmail: http://www.riscos.info/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment