Mercurial > pidgin
diff src/perl.c @ 3630:9682c0e022c6
[gaim-migrate @ 3753]
Yeah this will probably break a lot of shit knowing my luck. But hey, I really don't care what people thnk.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 11 Oct 2002 03:14:01 +0000 |
parents | 163205125ee2 |
children | 31480901bf29 |
line wrap: on
line diff
--- a/src/perl.c Fri Oct 11 02:10:08 2002 +0000 +++ b/src/perl.c Fri Oct 11 03:14:01 2002 +0000 @@ -35,20 +35,32 @@ #ifdef USE_PERL #define group perl_group - +#ifdef _WIN32 +/* This took me an age to figure out.. without this __declspec(dllimport) + * will be ignored. + */ +#define HASATTRIBUTE +#endif #include <EXTERN.h> #ifndef _SEM_SEMUN_UNDEFINED #define HAS_UNION_SEMUN #endif #include <perl.h> #include <XSUB.h> +#ifndef _WIN32 #include <sys/mman.h> +#endif #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #undef PACKAGE #include <stdio.h> +#ifndef _WIN32 #include <dirent.h> +#else +/* We're using perl's win32 port of this */ +#define dirent direct +#endif #include <string.h> #undef group @@ -61,6 +73,9 @@ #ifdef DEBUG #undef DEBUG #endif +#ifdef _WIN32 +#undef pipe +#endif #include "gaim.h" #include "prpl.h" @@ -185,11 +200,11 @@ sv = GvSV(gv_fetchpv("@", TRUE, SVt_PV)); if (SvTRUE(sv)) { - snprintf(buf, 512, "Perl error: %s\n", SvPV(sv, count)); + g_snprintf(buf, 512, "Perl error: %s\n", SvPV(sv, count)); debug_printf(buf); POPs; } else if (count != 1) { - snprintf(buf, 512, "Perl error: expected 1 value from %s, " + g_snprintf(buf, 512, "Perl error: expected 1 value from %s, " "got: %d\n", function, count); debug_printf(buf); } else {