bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gsort problem


From: Paul Eggert
Subject: Re: gsort problem
Date: Tue, 23 May 2006 01:11:14 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Does the following patch to lib/tempname.c fix things for you?

--- tempname.c.~1.17.~  2005-09-21 23:05:39.000000000 -0700
+++ tempname.c  2006-05-23 01:09:20.000000000 -0700
@@ -66,14 +66,16 @@
 
 #if _LIBC
 # define struct_stat64 struct stat64
+# define small_open __open
+# define large_open __open64
 #else
 # include "stat-macros.h"
 # define struct_stat64 struct stat
+# define small_open open
+# define large_open open
 # define __getpid getpid
 # define __gettimeofday gettimeofday
 # define __mkdir mkdir
-# define __open open
-# define __open64 open
 # define __lxstat64(version, file, buf) lstat (file, buf)
 # define __xstat64(version, file, buf) stat (file, buf)
 #endif
@@ -269,11 +271,11 @@ __gen_tempname (char *tmpl, int kind)
       switch (kind)
        {
        case __GT_FILE:
-         fd = __open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+         fd = small_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
          break;
 
        case __GT_BIGFILE:
-         fd = __open64 (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+         fd = large_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
          break;
 
        case __GT_DIR:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]