unoapploader.c (a2264196) | unoapploader.c (4aba5f85) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 195 unchanged lines hidden (view full) --- 204 { 205 strcat( envstr, PATHSEPARATOR ); 206 strcat( envstr, value ); 207 } 208 putenv( envstr ); 209#ifdef MACOSX 210 /* https://bz.apache.org/ooo/show_bug.cgi?id=127965 */ 211 value = getenv( "PATH" ); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 195 unchanged lines hidden (view full) --- 204 { 205 strcat( envstr, PATHSEPARATOR ); 206 strcat( envstr, value ); 207 } 208 putenv( envstr ); 209#ifdef MACOSX 210 /* https://bz.apache.org/ooo/show_bug.cgi?id=127965 */ 211 value = getenv( "PATH" ); |
212 size = strlen( "PATH" ) + strlen( "=/usr/local/bin" ) + 1; 213 if ( value != NULL ) 214 size += strlen( PATHSEPARATOR ) + strlen( value ); 215 envstr = (char*) malloc( size ); 216 strcpy( envstr, "PATH=" ); 217 if ( value != NULL ) { 218 strcat( envstr, value); 219 strcat( envstr, PATHSEPARATOR); | 212 if (!strstr ( value, "/usr/local/bin" )) { 213 size = strlen( "PATH" ) + strlen( "=/usr/local/bin" ) + 1; 214 if ( value != NULL ) 215 size += strlen( PATHSEPARATOR ) + strlen( value ); 216 envstr = (char*) malloc( size ); 217 strcpy( envstr, "PATH=" ); 218 if ( value != NULL ) { 219 strcat( envstr, value); 220 strcat( envstr, PATHSEPARATOR); 221 } 222 strcat( envstr, "/usr/local/bin" ); /* We are adding at the end */ 223 putenv( envstr ); |
220 } | 224 } |
221 strcat( envstr, "/usr/local/bin" ); /* We are adding at the end */ 222 putenv( envstr ); | |
223 224 /* https://bz.apache.org/ooo/show_bug.cgi?id=127966 */ 225 value = getenv ( "HOME" ); 226 if ( value && *value ) { 227 chdir ( value ); 228 } else { 229 chdir ( "/tmp" ); 230 } --- 99 unchanged lines hidden --- | 225 226 /* https://bz.apache.org/ooo/show_bug.cgi?id=127966 */ 227 value = getenv ( "HOME" ); 228 if ( value && *value ) { 229 chdir ( value ); 230 } else { 231 chdir ( "/tmp" ); 232 } --- 99 unchanged lines hidden --- |