/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void *
{
void *p;
#if defined(__sparcv9)
/*
* For Ultrasparc, we must force addresses to be less than 4Gb,
* since Fcode assumes that addresses can be stored in 32 bits.
* To get around this would require turning all addresses into
* cookies, which is a lot of work.
*/
if (((uint64_t)p) >= 0x100000000) {
}
#endif /* __sparcv9 */
if (p) {
} else
(uint64_t)n);
return (p);
}
void *
{
void *newp;
p, n);
safe_free(p, f, l);
return (NULL);
}
if (p) {
safe_free(p, f, l);
}
return (newp);
}
void
safe_free(void *p, char *f, int l)
{
if (p) {
free(p);
}
}
char *
safe_strdup(char *s, char *f, int l)
{
char *p = strdup(s);
return (p);
}
static void
_init(void)
{
int i;
fcode_impl_count = 0;
/* Setup the initial forth environment */
initial_env = env;
/*
* Need to define this early because it is the default for
* all unimpl, FCODE functions
*/
for (i = 0; i <= MAX_FCODE; i++) {
}
fcode_impl_count = 0;
}