Permalink
Browse files

[mingw] fix build

broken since d923903
where warning implicit-function-declaration becomes an error.
so, now probe process.h which declares _getpid.
  • Loading branch information...
1 parent ab45201 commit daad3e865e0757406f5dc875c2a3698906ce5334 @fperrad fperrad committed Mar 18, 2012
Showing with 6 additions and 13 deletions.
  1. +1 −1 config/auto/headers.pm
  2. +5 −0 include/parrot/parrot.h
  3. +0 −4 src/runcore/cores.c
  4. +0 −4 src/runcore/profiling.c
  5. +0 −4 src/runcore/subprof.c
View
@@ -110,7 +110,7 @@ sub _list_extra_headers {
# annotation language (SAL), introduced with Visual C++ 8.0. See
# <http://msdn2.microsoft.com/en-us/library/ms235402(VS.80).aspx>,
# <http://msdn2.microsoft.com/en-us/library/dabb5z75(VS.80).aspx>.
- push @extra_headers, qw(sal.h);
+ push @extra_headers, qw(sal.h process.h);
}
return @extra_headers;
View
@@ -53,6 +53,11 @@
# include <unistd.h>
#endif /* PARROT_HAS_HEADER_UNISTD */
+#ifdef PARROT_HAS_HEADER_PROCESS
+# include <process.h>
+# define getpid _getpid
+#endif /* PARROT_HAS_HEADER_PROCESS */
+
#ifdef PARROT_HAS_HEADER_SYSMMAN
# include <sys/mman.h>
# ifndef MAP_FAILED
View
@@ -252,10 +252,6 @@ next opcode, or examine and manipulate data from the executing program.
#include "pmc/pmc_sub.h"
#include "pmc/pmc_callcontext.h"
-#ifdef WIN32
-# define getpid _getpid
-#endif
-
/* HEADERIZER HFILE: include/parrot/runcore_api.h */
/* HEADERIZER BEGIN: static */
View
@@ -28,10 +28,6 @@ Functions controlling Parrot's profiling runcore.
#include "pmc/pmc_callcontext.h"
#include "pmc/pmc_namespace.h"
-#ifdef WIN32
-# define getpid _getpid
-#endif
-
#define PPROF_VERSION 2
#define code_start interp->code->base.data
View
@@ -25,10 +25,6 @@ src/runcore/subprof.c - Parrot's subroutine-level profiler
#include "pmc/pmc_sub.h"
#include "pmc/pmc_callcontext.h"
-#ifdef WIN32
-# define getpid _getpid
-#endif
-
/* HEADERIZER HFILE: include/parrot/runcore_subprof.h */
/* HEADERIZER BEGIN: static */

0 comments on commit daad3e8

Please sign in to comment.