GIT.Harvie.CZ
/
mirrors
/
libpurple-core-answerscripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
39195dd
)
Added notes for future porting to windows
author
Harvie
<tomas@mudrunka.cz>
Sun, 29 Aug 2010 22:07:21 +0000
(
00:07
+0200)
committer
Harvie
<tomas@mudrunka.cz>
Sun, 29 Aug 2010 22:07:21 +0000
(
00:07
+0200)
answerscripts.c
patch
|
blob
|
blame
|
history
diff --git
a/answerscripts.c
b/answerscripts.c
index c2e4dd0acbc26aeebc3809383711b8c7022c26d8..f84dcc6c00352f760948234b4080a2ab5abe9b24 100755
(executable)
--- a/
answerscripts.c
+++ b/
answerscripts.c
@@
-17,6
+17,8
@@
#ifndef __WIN32__
#include <fcntl.h>
#ifndef __WIN32__
#include <fcntl.h>
+#else
+ #include <windows.h>
#endif
/* Purple plugin */
#endif
/* Purple plugin */
@@
-44,7
+46,7
@@
int answerscripts_process_message_cb(answerscripts_job *job) {
if (pipe && !feof(pipe)) {
if(!fgets(response, ANSWERSCRIPTS_LINE_LENGTH, pipe)
if (pipe && !feof(pipe)) {
if(!fgets(response, ANSWERSCRIPTS_LINE_LENGTH, pipe)
- && (errno == EWOULDBLOCK || errno == EAGAIN)
+ && (errno == EWOULDBLOCK || errno == EAGAIN)
//WARNING! Not compatible with windows :-(
) return 1;
for(i=0;response[i];i++) if(response[i]=='\n') response[i]=0;
) return 1;
for(i=0;response[i];i++) if(response[i]=='\n') response[i]=0;
@@
-100,6
+102,8
@@
static void received_im_msg_cb(PurpleAccount *account, char *who, char *buffer,
#ifndef __WIN32__
int fflags = fcntl(fileno(job->pipe), F_GETFL, 0);
fcntl(fileno(job->pipe), F_SETFL, fflags | O_NONBLOCK);
#ifndef __WIN32__
int fflags = fcntl(fileno(job->pipe), F_GETFL, 0);
fcntl(fileno(job->pipe), F_SETFL, fflags | O_NONBLOCK);
+ #else
+ //WARNING! Somehow implement FILE_FLAG_OVERLAPPED & FILE_FLAG_NO_BUFFERING support on windows
#endif
purple_timeout_add(ANSWERSCRIPTS_TIMEOUT_INTERVAL, (GSourceFunc) answerscripts_process_message_cb, (gpointer) job);
#endif
purple_timeout_add(ANSWERSCRIPTS_TIMEOUT_INTERVAL, (GSourceFunc) answerscripts_process_message_cb, (gpointer) job);
This page took
0.134116 seconds
and
4
git commands to generate.