#ifndef lint
static char *RCSid = "$Id: rexxext.c,v 1.7 1993/02/09 17:30:13 anders Exp anders $";
#endif

/*
 *  The Regina Rexx Interpreter
 *  Copyright (C) 1992-1994  Anders Christensen <anders@pvv.unit.no>
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Library General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU Library General Public
 *  License along with this library; if not, write to the Free
 *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
    This code modified for Win32 port by Ataman Software, Inc. June 29, 1995.
*/

#include "rexx.h"
#include <stdio.h>
#if !defined(VMS) && !defined(WIN32)
# include <unistd.h>
# include <pwd.h>
#endif

streng *rex_userid( paramboxptr parms ) 
{
   checkparam( parms, 0, 0 ) ;
#ifdef VMS
   return nullstringptr() ;
#elif defined(WIN32)
   return( Str_cre( Win32UserName()) ) ;
#else
   return( Str_cre(getpwuid(getuid())->pw_name)) ;
#endif
}
