nlsupport.c (ca3b41fa) | nlsupport.c (a2264196) |
---|---|
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 --- 864 unchanged lines hidden (view full) --- 873 setenv("LANG", locale, 1 ); 874 875 /* 876 * This is a hack. We know that we are setting some envvars here 877 * and due to https://bz.apache.org/ooo/show_bug.cgi?id=127965 878 * we need to update PATH on macOS. Doing it here ensures 879 * that it's done but it's not the right location to be doing 880 * this. | 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 --- 864 unchanged lines hidden (view full) --- 873 setenv("LANG", locale, 1 ); 874 875 /* 876 * This is a hack. We know that we are setting some envvars here 877 * and due to https://bz.apache.org/ooo/show_bug.cgi?id=127965 878 * we need to update PATH on macOS. Doing it here ensures 879 * that it's done but it's not the right location to be doing 880 * this. |
881 * 882 * Also address https://bz.apache.org/ooo/show_bug.cgi?id=127966 883 * here as well :/ |
|
881 */ 882 opath = getenv ( "PATH" ); 883 slen = strlen( "/usr/local/bin" ) + 1; 884 if ( opath != NULL ) 885 slen += strlen( ":" ) + strlen( opath ); 886 npath = malloc( slen ); 887 if ( opath != NULL ) { 888 strcat( npath, opath ); 889 strcat( npath, ":" ); 890 } 891 strcat( npath, "/usr/local/bin" ); /* We are adding at the end */ 892 setenv("PATH", npath, 1 ); 893 free(npath); 894 | 884 */ 885 opath = getenv ( "PATH" ); 886 slen = strlen( "/usr/local/bin" ) + 1; 887 if ( opath != NULL ) 888 slen += strlen( ":" ) + strlen( opath ); 889 npath = malloc( slen ); 890 if ( opath != NULL ) { 891 strcat( npath, opath ); 892 strcat( npath, ":" ); 893 } 894 strcat( npath, "/usr/local/bin" ); /* We are adding at the end */ 895 setenv("PATH", npath, 1 ); 896 free(npath); 897 |
898/* https://bz.apache.org/ooo/show_bug.cgi?id=127966 */ 899 opath = getenv ( "HOME" ); 900 if ( opath && *opath ) { 901 chdir ( opath ); 902 } else { 903 chdir ( "/tmp" ); 904 } 905 |
|
895#ifdef DEBUG 896 fprintf( stderr, "nlsupport.c: _imp_getProcessLocale() returning %s as current locale.\n", locale ); 897#endif 898 899// pthread_mutex_unlock( &aLocalMutex ); 900 901} 902#else --- 65 unchanged lines hidden --- | 906#ifdef DEBUG 907 fprintf( stderr, "nlsupport.c: _imp_getProcessLocale() returning %s as current locale.\n", locale ); 908#endif 909 910// pthread_mutex_unlock( &aLocalMutex ); 911 912} 913#else --- 65 unchanged lines hidden --- |