On Friday 07 December 2007 Alexander Skwar wrote:
> Philipp Marek schrieb:
> > On Friday 07 December 2007 Alexander Skwar wrote:
> >> helper.c: In function 'hlp__match_path_envs':
> >> helper.c:1423: error: 'environ' undeclared (first use in this function)
> >> helper.c:1423: error: (Each undeclared identifier is reported only once
> >> helper.c:1423: error: for each function it appears in.)
> >> helper.c: In function 'hlp__format_path':
> >> helper.c:1580: error: 'environ' undeclared (first use in this function)
> >
> > Is there some header file that declares environ?
>
> Doesn't look like. Attached, you can find the output
> of
>
>       grep -r environ /usr/include
Thank you ... environ is in SUS ... don't know why that doesn't work.

I'd like to take a look at that ... maybe there is some function to get that 
pointers.


How about that? 


Index: fsvs.c
===================================================================
--- fsvs.c      (Revision 1255)
+++ fsvs.c      (Arbeitskopie)
@@ -310,6 +310,9 @@ apr_pool_t *global_pool;

 struct url_t *current_url;

+/** For Solaris, which doesn't have one ... */
+char **environ=NULL;
+

 /** -.
  * Never called directly, used only via the macro DEBUGP().  */
@@ -769,7 +772,7 @@ void *_do_component_tests(int a)
  *   in a clean list.
  * - And calls the main action.
  * */
-int main(int argc, char *args[], char *environ[])
+int main(int argc, char *args[], char *env[])
 {
        struct estat root = { };
        int status, help;
@@ -781,6 +784,7 @@ int main(int argc, char *args[])

        help=0;
        eo_args=1;
+       environ=env;
        program_name=args[0];
 #ifdef ENABLE_DEBUG
        /* If STDOUT and STDIN are on a terminal, we could possibly be
Index: global.h
===================================================================
--- global.h    (Revision 1254)
+++ global.h    (Arbeitskopie)
@@ -845,4 +845,7 @@ extern int start_path_len;
 #define ANSI__NORMAL "\x1b[0;0m"
 /** @} */

+/** For Solaris */
+extern char **environ;
+
 #endif



-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to