Skip to content

Commit

Permalink
Do not special case temporary directory in cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Feb 2, 2021
1 parent 5861889 commit c2e1e80
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,12 +976,7 @@ static Obj FuncREAD_GAP_ROOT(Obj self, Obj filename)
*/
static Obj FuncTmpName(Obj self)
{
#ifdef SYS_IS_CYGWIN32
char name[] = "C:/WINDOWS/Temp/gaptempfile.XXXXXX";
#else
char name[] = "/tmp/gaptempfile.XXXXXX";
#endif

int fd = mkstemp(name);
if (fd < 0)
return Fail;
Expand All @@ -1002,11 +997,7 @@ static Obj FuncTmpDirectory(Obj self)
name = MakeString(env_tmpdir);
}
else {
#ifdef SYS_IS_CYGWIN32
name = MakeString("C:/WINDOWS/Temp/");
#else
name = MakeString("/tmp");
#endif
}
const char * extra = "/gaptempdirXXXXXX";
AppendCStr(name, extra, strlen(extra));
Expand Down

0 comments on commit c2e1e80

Please sign in to comment.