DEADSOFTWARE

Patched for Linux
[mp3cc.git] / MPC.3.5.LINUX / preverifier / stubs.c
1 /*
2 * @(#)stubs.c 1.6 02/09/27
3 *
4 * Copyright 1995-1998 by Sun Microsystems, Inc.,
5 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
6 * All rights reserved.
7 *
8 * This software is the confidential and proprietary information
9 * of Sun Microsystems, Inc. ("Confidential Information"). You
10 * shall not disclose such Confidential Information and shall use
11 * it only in accordance with the terms of the license agreement
12 * you entered into with Sun.
13 * Use is subject to license terms.
14 */
16 /*=========================================================================
17 * SYSTEM: Verifier
18 * SUBSYSTEM: Stubs.
19 * FILE: stubs.c
20 * OVERVIEW: Miscellaneous functions used during class loading, etc.
21 *
22 * AUTHOR: Sheng Liang, Sun Microsystems, Inc.
23 * Edited by Tasneem Sayeed, Sun Microsystems
24 *=======================================================================*/
26 /*=========================================================================
27 * Include files
28 *=======================================================================*/
30 #include "oobj.h"
31 #include "sys_api.h"
33 void
34 SignalError(struct execenv * ee, char *ename, char *DetailMessage)
35 {
36 printCurrentClassName();
37 jio_fprintf(stderr, "%s", ename);
38 if (DetailMessage) {
39 jio_fprintf(stderr, ": %s\n", DetailMessage);
40 } else {
41 jio_fprintf(stderr, "\n");
42 }
43 exit(1);
44 }
46 bool_t
47 VerifyClassAccess(ClassClass *current_class, ClassClass *new_class,
48 bool_t classloader_only)
49 {
50 return TRUE;
51 }
53 /* This is called by FindClassFromClass when a class name is being requested
54 * by another class that was loaded via a classloader. For javah, we don't
55 * really care.
56 */
58 ClassClass *
59 ClassLoaderFindClass(struct execenv *ee,
60 struct Hjava_lang_ClassLoader *loader,
61 char *name, bool_t resolve)
62 {
63 return NULL;
64 }
66 /* Get the execution environment
67 */
68 ExecEnv *
69 EE() {
70 static struct execenv lee;
71 return &lee;
72 }
74 bool_t RunStaticInitializers(ClassClass *cb)
75 {
76 return TRUE;
77 }
79 void InitializeInvoker(ClassClass *cb)
80 {
81 }
83 int verifyclasses = VERIFY_ALL;
84 long nbinclasses, sizebinclasses;
85 ClassClass **binclasses;
86 bool_t verbose;
87 struct StrIDhash *nameTypeHash;
88 struct StrIDhash *stringHash;
90 void *allocClassClass()
91 {
92 ClassClass *cb = sysCalloc(1, sizeof(ClassClass));
93 Classjava_lang_Class *ucb = sysCalloc(1, sizeof(Classjava_lang_Class));
95 cb->obj = ucb;
96 ucb->HandleToSelf = cb;
97 return cb;
98 }
100 void DumpThreads() {}