Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 13, 2011
@Whiteknight Whiteknight Fix a preprocessor directive in Env PMC, and add in some TODO notes a…
…bout places we need to fix for windows (environ global is deprecated there)
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/pmc/env.pmc
8 src/pmc/env.pmc
@@ -22,7 +22,7 @@ C<Env> is a singleton class which provides access to the system environment.
MS C compilers know about environ, as it is declared in stdlib.h.
OS X doesn't allow access to "environ" from within shared libraries.
-#ifndef WIN32
+#ifndef _WIN32
# ifdef __APPLE_CC__
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
@@ -91,9 +91,12 @@ This method is questionable, as environ is not in ISO-C.
VTABLE INTVAL elements() {
INTVAL rv = 0;
+#ifndef _WIN32
while (environ[rv] != NULL)
+ // TODO: Implement on win32
return rv;
@@ -181,6 +184,7 @@ Used during iteration.
return CONST_STRING(interp, "");
else {
+ // TODO: Implement on win32.
STRING * const envp = Parrot_str_from_platform_cstring(interp, environ[pos]);
const INTVAL delim = STRING_index(interp, envp, CONST_STRING(interp, "="), 0);
return STRING_substr(interp, envp, 0, delim);

No commit comments for this range

Something went wrong with that request. Please try again.