bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] readline 8.0 in windows


From: Chet Ramey
Subject: Re: [Bug-readline] readline 8.0 in windows
Date: Wed, 3 Apr 2019 18:39:14 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/3/19 4:54 PM, JohnD wrote:

> Msys2 recently went to 8.0
> https://github.com/msys2/MINGW-packages/pull/5011
> 
> I'll verify it doesn’t work there and let them know
> 
> 
> For reference, Windoze does have its own 'rename' like function
> https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-movefileexa
> 
> So I was going to try adding something like:
> static int
> history_rename(const char *from, const char *to)
> {
> #if defined(_WIN32)
>   if (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING)) {
>     return -1;
>   }
>   return 0;
> #else
>   return rename(from, to);
> #endif
> }
> 
> And change the rename calls to history_rename

That approach looks reasonable. Let me know what works best, and I'll patch
the source.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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