Fossil

Check-in [2d4c16df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:proper env() handler for (at least) NetBSD
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | env_handler
Files: files | file ages | folders
SHA3-256: 2d4c16df5a9e61c25fd4b96831c5a1e9f8689ce0f61992d7185dddee11bed973
User & Date: bch 2019-08-02 05:09:46
References
2019-08-02
18:13
Avoid the clearenv() interface (which seems to be missing on NetBSD according to [2d4c16df5a9e61c2]) and simply set the global "environ" variable directly. check-in: d72aa24c user: drh tags: trunk
Context
2019-08-03
01:07
merge to logical conclusion (nop) check-in: f4f9c109 user: bch tags: trunk
2019-08-02
05:09
proper env() handler for (at least) NetBSD Leaf check-in: 2d4c16df user: bch tags: env_handler
00:10
The test-httpmsg command now sends the payload uncompressed unless the new --compress option is used. check-in: c31ff76f user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

22
23
24
25
26
27
28

29
30
31
32
33
34
35
....
1765
1766
1767
1768
1769
1770
1771

1772



1773
1774
1775
1776
1777
1778
1779
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "file.h"


/*
** On Windows, include the Platform SDK header file.
*/
#ifdef _WIN32
# include <direct.h>
# include <windows.h>
................................................................................
      rc = 2;
    }
  }else{
    rc = 1;
  }
  return rc;
#else

  return clearenv();



#endif
}

/*
** Like fopen() but always takes a UTF8 argument.
**
** This function assumes ExtFILE. In other words, symbolic links







>







 







>

>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
....
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "file.h"
extern char **environ;

/*
** On Windows, include the Platform SDK header file.
*/
#ifdef _WIN32
# include <direct.h>
# include <windows.h>
................................................................................
      rc = 2;
    }
  }else{
    rc = 1;
  }
  return rc;
#else
#ifdef HAVE_CLEARENV
  return clearenv();
#else
  environ = NULL;
#endif
#endif
}

/*
** Like fopen() but always takes a UTF8 argument.
**
** This function assumes ExtFILE. In other words, symbolic links