2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * CDDL HEADER START
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * The contents of this file are subject to the terms of the
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Common Development and Distribution License, Version 1.0 only
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * (the "License"). You may not use this file except in compliance
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * with the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * See the License for the specific language governing permissions
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * and limitations under the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * When distributing Covered Code, include this CDDL HEADER in each
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * If applicable, add the following below this CDDL HEADER, with the
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * fields enclosed by brackets "[]" replaced with your own identifying
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * information: Portions Copyright [yyyy] [name of copyright owner]
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * CDDL HEADER END
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright (c) 1996, by Sun Microsystems, Inc.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * All rights reserved.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster#pragma ident "%Z%%M% %I% %E% SMI"
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * MKS interface extension.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * A version of getenv() that doesn't overwrite it's return value
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * on each call.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright 1995 by Mortice Kern Systems Inc. All rights reserved.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterstatic char const rcsID[] = "$Header: /rd/src/libc/mks/rcs/m_getenv.c 1.2 1995/07/11 16:53:01 ross Exp $";
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster#endif /*lint*/
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster#endif /*M_RCSID*/
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Assume getenv() works the way we expect it to on PC systems.
extern char **environ;
char *s = *envp++;
while(s != NULL) {
s = *envp++;
return NULL;