待辦事項 #36528

Mac向けエンコーディング変換処理の見直し

啟用日期: 2016-08-09 00:59 最後更新: 2020-12-12 18:55

回報者:
負責人:
類型:
狀態:
關閉
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
檔案:
1

細節

OS X El Capitan (10.11) でmakeしたところ、header.cのコンパイル中に下記のWarningが出ました。

gcc -DHAVE_CONFIG_H -I. -I..  -DEUC -DSUPPORT_LH7   -I/usr/local/include -MT header.o -MD -MP -MF .deps/header.Tpo -c -o header.o header.c
...
header.c:1943:16: warning: implicit declaration of function
      'CFStringEncodingBytesToUnicode' is invalid in C99
      [-Wimplicit-function-declaration]
    cfResult = CFStringEncodingBytesToUnicode(scriptEncoding,
               ^
header.c:1952:20: warning: implicit declaration of function
      'CFStringEncodingUnicodeToBytes' is invalid in C99
      [-Wimplicit-function-declaration]
        cfResult = CFStringEncodingUnicodeToBytes(kCFStringEncodingUTF8,
                   ^
CFStringEncodingBytesToUnicode()やCFStringEncodingUnicodeToBytes()がヘッダに無いようです(動作はするのですが)。昔と違って今ではiconvが利用できるので、iconvを優先的に利用した方がよいのではないかと思います。iconvを優先的に利用するパッチを書きました。

なお、autoconfまわりの修正は含んでいません。OS Xでiconvを利用する場合、LIBS に -liconv が必要です。また、LDFLAGS に設定される -framework CoreFoundation は不要となります。

Ticket History (3/5 Histories)

2016-08-09 00:59 Updated by: hirotosakai
  • New Ticket "Mac向けエンコーディング変換処理の見直し" created
2016-08-09 06:57 Updated by: arai
  • 負責人 Update from (無) to arai
評語

お久しぶりです。ありがとうございます。少しあとになりますが内容を確認いたします

2016-10-05 23:32 Updated by: arai
  • 狀態 Update from 開啟 to 關閉
  • Ticket Close date is changed to 2016-10-05 23:32
2020-12-12 18:55 Updated by: arai
  • Details Updated
評語

4年の時を経過してまともな対応をしました

https://github.com/jca02266/lha/commit/f07d076

iconv に関しては以下のような対応を検証中

https://github.com/jca02266/lha/pull/19

(Edited, 2020-12-12 19:27 Updated by: arai)

Attachment File List

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入