Skip to content

Instantly share code, notes, and snippets.

@kosh04
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save kosh04/b4c6d29a4d76d1aa25d8 to your computer and use it in GitHub Desktop.

Select an option

Save kosh04/b4c6d29a4d76d1aa25d8 to your computer and use it in GitHub Desktop.
MinGW で Readline 6.3 をコンパイルする

※コンパイルとリンクは出来たが動作が不完全だったためボツ

参考リンク

手順

mingw-get install mingw32-pdcurses
mingw-get install mingw32-libpdcurses
wget ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz
tar xvf readline-6.3.tar.gz
cd readline-6.3
./configure --prefix=/usr/local
nano config.h
make SHLIB_LIBS=-lpdcurses
make install
/**
* signalとstat周りのマクロが未定義なので、下のURLを参考にconfig.hに定義を色々突っ込む
* http://www.opensource.apple.com/source/Git/Git-33/src/git/compat/mingw.h
*/
#define S_IFLNK 0120000 /* Symbolic link */
#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(x) 0
#define S_IRGRP 0
#define S_IWGRP 0
#define S_IXGRP 0
#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
#define S_IROTH 0
#define S_IWOTH 0
#define S_IXOTH 0
#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
#define S_ISUID 0
#define S_ISGID 0
#define S_ISVTX 0
#define SIGHUP 1
#define SIGQUIT 3
#define SIGKILL 9
#define SIGPIPE 13
#define SIGALRM 14
#define SIGCHLD 17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment