Changed getenv to ensure it always allocates a buffer before calling
Paul Skirrow authored
  OS_ReadVarVal.

Detail:
  getenv calls OS_ReadVarVal to read a system variable into a buffer.
  If the buffer is not big enough it increases the size of the buffer by
  256 bytes and tries again.
  However, the first time it was called, it would have no buffer and
  would call OS_ReadVarVal with r2=-1. The PRM says this "may" return an error
  which should be ignored, but if it did not return an error then getenv
  would not allocate a buffer and the call would fail.
  This change allocates a 256 byte buffer before OS_ReadVarVal is called.

Admin:
  Untested.

Version 5.20. Tagged as 'RISC_OSLib-5_20'
9076880f
Name Last commit Last update
Doc 32-bit work merged from kbracey_32bit branch.
aof Import from cleaned 360 CD
c Changed getenv to ensure it always allocates a buffer before calling
clib Added cut-down target which excludes RISC_OSLib.
derived Import from cleaned 360 CD
h * Trailing garbage no longer appears after some perror() calls.
hdr 32-bit work merged from kbracey_32bit branch.
kernel/s Fixed bug in _swi/_swix code.
lib Import from cleaned 360 CD
linked Import from cleaned 360 CD
m_o Import from cleaned 360 CD
m_o_rl Import from cleaned 360 CD
map Import from cleaned 360 CD
o Import from cleaned 360 CD
o_rl Import from cleaned 360 CD
o_rl_dec Import from cleaned 360 CD
rlib Uses SYMDEFS files to avoid xtentries(app) and symgen.
rm_o Import from cleaned 360 CD
rm_o_d Import from cleaned 360 CD
rm_o_rl Import from cleaned 360 CD
rm_o_rl_d Import from cleaned 360 CD
s * RAM build of CLib now squeezed.
syms Added cut-down target which excludes RISC_OSLib.
test 32-bit work merged from kbracey_32bit branch.
.gitattributes Import from cleaned 360 CD
BlackLog
LICENSE
Makefile
MkClean,fd7
MkExport,fd7
MkInstall,fd7
MkLibs,fd7
MkLibs26,fd7
MkRom,fd7
MkRomFull,fd7
Mk_mjs,fd7
SWIOptions,feb
VersionASM
VersionNum