ezcgi.inc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Michael Van Canneyt
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. Uses
  12. {$ifdef ver1_0}
  13. Linux
  14. {$else}
  15. baseUnix
  16. {$endif}
  17. ;
  18. { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
  19. Function Getenv (Var EnvVar : AnsiString): AnsiString;
  20. Var P : Pchar;
  21. begin
  22. // Linux version returns pchar.
  23. p:={$ifdef ver1_0}Linux.getenv{$else}BaseUnix.fpgetenv{$endif}(EnvVar);
  24. if P<>nil then
  25. getenv:=strpas(p)
  26. else
  27. getenv:='';
  28. end;
  29. {
  30. $Log$
  31. Revision 1.7 2003-09-20 20:23:08 marco
  32. * fix
  33. Revision 1.6 2003/09/20 12:38:29 marco
  34. * FCL now compiles for FreeBSD with new 1.1. Now Linux.
  35. Revision 1.5 2002/09/07 15:15:29 peter
  36. * old logs removed and tabs fixed
  37. }