nano-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] fix building for Windows


From: LIU Hao
Subject: Re: [PATCH] fix building for Windows
Date: Tue, 1 Mar 2022 21:08:48 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

在 3/1/22 18:08, Benno Schulenberg 写道:

Op 26-02-2022 om 08:15 schreef Mike Frysinger:
Fix building with x86_64-w64-mingw32 to cross-compile native Windows
programs.  Need to:
* add checks for missing functions
* don't use signals that are unavailable on the platform
* avoid useless non-Linux sys/ioctl.h include
* use putenv instead of setenv as the latter is unavailable
---

I am glad to see that there are finally efforts to add Windows support. Although this patch may make nano compile for *-w64-mingw32 targets, it is not complete yet [1]:

1) The MSVCRT `open()` function opens files in text by default and may
   result in `"\r\r\n"` if nano is told to save text in DOS format. The
   `_O_BINARY` flag has to specified.

2) The Gnulib `glob()` function does not recognize backslashes as path
   separators. It is suggested that users use forwardslashes in config
   files, but replacing them inside nano should be preferred.

3) The path for the active console device is `"CONIN$"` instead of
   `"/dev/tty"`.

4) Bracketed-paste mode should be disabled for native Windows.


But after all, thanks for your work!



[1] 
https://github.com/lhmouse/nano-win/commit/f0a8e7931f4f80d24c8c7e8732ed692b461dd2bf



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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