ezcgi.inc 873 B

12345678910111213141516171819202122232425262728293031323334353637
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Michael Van Canneyt
  4. See the file COPYING.FPC, included in this distribution,
  5. for details about the copyright.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. **********************************************************************}
  10. Uses
  11. {$ifdef ver1_0}
  12. Linux
  13. {$else}
  14. baseUnix
  15. {$endif}
  16. ;
  17. { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
  18. Function Getenv (Var EnvVar : AnsiString): AnsiString;
  19. Var P : Pchar;
  20. begin
  21. // Linux version returns pchar.
  22. p:={$ifdef ver1_0}Linux.getenv{$else}BaseUnix.fpgetenv{$endif}(EnvVar);
  23. if P<>nil then
  24. getenv:=strpas(p)
  25. else
  26. getenv:='';
  27. end;