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

bugzilla-daemon at riscos.info bugzilla-daemon at riscos.info
Mon May 7 05:36:51 PDT 2012


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 at aaug.net
        ReportedBy: duncan_moore at 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.




More information about the gcc mailing list