diff -Naur rtorrent-0.8.5/rak/socket_address.h rtorrent-0.8.5-haiku/rak/socket_address.h
|
old
|
new
|
|
| 55 | 55 | #include <sys/types.h> |
| 56 | 56 | #include <sys/socket.h> |
| 57 | 57 | |
| | 58 | typedef unsigned short sa_family_t; |
| | 59 | |
| 58 | 60 | namespace rak { |
| 59 | 61 | |
| 60 | 62 | class socket_address_inet; |
diff -Naur rtorrent-0.8.5/src/display/canvas.cc rtorrent-0.8.5-haiku/src/display/canvas.cc
|
old
|
new
|
|
| 38 | 38 | |
| 39 | 39 | #include <unistd.h> |
| 40 | 40 | #include <sys/ioctl.h> |
| 41 | | #include <sys/termios.h> |
| | 41 | #include <termios.h> |
| 42 | 42 | #include <torrent/exceptions.h> |
| 43 | 43 | |
| 44 | 44 | #include "canvas.h" |
diff -Naur rtorrent-0.8.5/src/display/window_file_list.cc rtorrent-0.8.5-haiku/src/display/window_file_list.cc
|
old
|
new
|
|
| 46 | 46 | #include "ui/element_file_list.h" |
| 47 | 47 | |
| 48 | 48 | #include "window_file_list.h" |
| | 49 | #include <wchar.h> |
| | 50 | typedef std::basic_string<wchar_t> StdWString; |
| 49 | 51 | |
| 50 | 52 | namespace display { |
| 51 | 53 | |
| … |
… |
|
| 59 | 61 | |
| 60 | 62 | // Convert std::string to std::wstring of given width (in screen positions), |
| 61 | 63 | // taking into account that some characters may be occupying two screen positions. |
| 62 | | std::wstring |
| | 64 | StdWString |
| 63 | 65 | wstring_width(const std::string& i_str, int width) { |
| 64 | 66 | wchar_t result[width + 1]; |
| 65 | 67 | size_t length = std::mbstowcs(result, i_str.c_str(), width); |
diff -Naur rtorrent-0.8.5/src/input/path_input.cc rtorrent-0.8.5-haiku/src/input/path_input.cc
|
old
|
new
|
|
| 42 | 42 | #include <rak/path.h> |
| 43 | 43 | |
| 44 | 44 | #include <sys/types.h> |
| 45 | | #include <sys/dir.h> |
| | 45 | #include <dirent.h> |
| | 46 | #include <sys/stat.h> |
| 46 | 47 | |
| 47 | 48 | #include "path_input.h" |
| 48 | 49 | |
| … |
… |
|
| 72 | 73 | |
| 73 | 74 | struct _transform_filename { |
| 74 | 75 | void operator () (utils::directory_entry& entry) { |
| 75 | | if (entry.d_type == DT_DIR) |
| | 76 | if (S_ISDIR(entry.d_type)) |
| 76 | 77 | entry.d_name += '/'; |
| 77 | 78 | } |
| 78 | 79 | }; |
diff -Naur rtorrent-0.8.5/src/signal_handler.cc rtorrent-0.8.5-haiku/src/signal_handler.cc
|
old
|
new
|
|
| 107 | 107 | return "Timer signal"; |
| 108 | 108 | case SIGTERM: |
| 109 | 109 | return "Termination signal"; |
| 110 | | case SIGBUS: |
| 111 | | return "Bus error"; |
| | 110 | // case SIGBUS: |
| | 111 | // return "Bus error"; |
| 112 | 112 | default: |
| 113 | 113 | return "Unlisted"; |
| 114 | 114 | } |
diff -Naur rtorrent-0.8.5/src/signal_handler.h rtorrent-0.8.5-haiku/src/signal_handler.h
|
old
|
new
|
|
| 37 | 37 | #ifndef RTORRENT_SIGNAL_HANDLER_H |
| 38 | 38 | #define RTORRENT_SIGNAL_HANDLER_H |
| 39 | 39 | |
| 40 | | #include <sys/signal.h> |
| | 40 | #include <signal.h> |
| 41 | 41 | #include <sigc++/functors/slot.h> |
| 42 | 42 | |
| 43 | 43 | class SignalHandler { |
diff -Naur rtorrent-0.8.5/src/utils/directory.cc rtorrent-0.8.5-haiku/src/utils/directory.cc
|
old
|
new
|
|
| 39 | 39 | #include <algorithm> |
| 40 | 40 | #include <functional> |
| 41 | 41 | #include <dirent.h> |
| | 42 | #include <sys/stat.h> |
| 42 | 43 | #include <rak/path.h> |
| 43 | 44 | #include <torrent/exceptions.h> |
| 44 | 45 | |
| … |
… |
|
| 69 | 70 | return false; |
| 70 | 71 | |
| 71 | 72 | struct dirent* entry; |
| | 73 | struct stat st; |
| 72 | 74 | |
| 73 | 75 | while ((entry = readdir(d)) != NULL) { |
| 74 | 76 | if ((flags & update_hide_dot) && entry->d_name[0] == '.') |
| … |
… |
|
| 78 | 80 | |
| 79 | 81 | itr->d_fileno = entry->d_fileno; |
| 80 | 82 | itr->d_reclen = entry->d_reclen; |
| 81 | | itr->d_type = entry->d_type; |
| | 83 | lstat(rak::path_expand(m_path).c_str(), &st); |
| | 84 | itr->d_type = st.st_mode; |
| 82 | 85 | |
| 83 | 86 | #ifdef DIRENT_NAMLEN_EXISTS_FOOBAR |
| 84 | 87 | itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen); |
diff -Naur rtorrent-0.8.5/src/utils/directory.h rtorrent-0.8.5-haiku/src/utils/directory.h
|
old
|
new
|
|
| 41 | 41 | #include <vector> |
| 42 | 42 | #include <inttypes.h> |
| 43 | 43 | |
| | 44 | #define d_fileno d_ino |
| | 45 | |
| 44 | 46 | namespace utils { |
| 45 | 47 | |
| 46 | 48 | struct directory_entry { |