File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 11#include "osfixes.h"
2+ #define _CRTIMP
23#define WIN32_LEAN_AND_MEAN
34#define _GL_CTYPE_H
45#define _GL_CONFIG_H_INCLUDED 1
56#include <windows.h>
67#ifdef WLB_INCL_WLB_DEBUG_H
78#include "wlb_debug.h"
89#endif
10+ #ifndef MAX_LONG_PATH
11+ #define MAX_LONG_PATH 32768
12+ #endif // !MAX_LONG_PATH
13+
914
1015// #include "term.h"
1116// #include "general.h"
12-
17+ #include <../ucrt/stdlib.h>
1318#include <../ucrt/stdio.h>
1419#ifndef TRUE
1520#define FALSE 0
1621#define TRUE 1
1722#endif // !FALSE
1823
24+ int clearenv (void )
25+ {
26+ char * envp , * s ;
27+ char name [MAX_LONG_PATH ];
28+
29+
30+ while (environ && (envp = * environ )) {
31+ if ((s = strchr (envp , '=' )) != NULL ) {
32+ strncpy (name , envp , s - envp + 1 );
33+ strncpy_s (name , sizeof (name ), envp , s - envp + 1 );
34+ name [s - envp + 1 + 1 ] = 0 ;
35+
36+ if (_putenv (name ) == -1 ) {
37+ return -1 ;
38+ }
39+ }
40+ else {
41+ return -1 ;
42+ }
43+ }
44+ return 0 ;
45+ }
1946#if defined (WLB_DISABLE_DEBUG_ASSERT_POPUP_AT_EXIT ) || defined(WLB_DISABLE_DEBUG_ASSERT_POPUP_AT_LAUNCH )
2047#if !defined(DisableDebugAssertPopup )
2148
Original file line number Diff line number Diff line change 1515#define WLB_DISABLE_DEBUG_ASSERT_POPUP_AT_LAUNCH
1616#define WLB_CONSTRUCTOR_SUPPORT
1717*/
18+ int clearenv (void );
1819extern void DisableDebugAssertAtExit ();
1920#if (defined(WLB_DISABLE_DEBUG_ASSERT_POPUP_AT_LAUNCH ) || defined(WLB_DISABLE_DEBUG_ASSERT_POPUP_AT_EXIT )) && ! defined(WLB_CONSTRUCTOR_SUPPORT )
2021#define WLB_CONSTRUCTOR_SUPPORT
You can’t perform that action at this time.
0 commit comments