diff options
Diffstat (limited to 'unix/dltest/pkge.c')
| -rw-r--r-- | unix/dltest/pkge.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index 6c74366..d616352 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -1,36 +1,35 @@ -/* +/* * pkge.c -- * - * This file contains a simple Tcl package "pkge" that is intended - * for testing the Tcl dynamic loading facilities. Its Init - * procedure returns an error in order to test how this is handled. + * This file contains a simple Tcl package "pkge" that is intended for + * testing the Tcl dynamic loading facilities. Its Init procedure returns + * an error in order to test how this is handled. * * Copyright (c) 1995 Sun Microsystems, Inc. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: pkge.c,v 1.4 1999/04/16 00:48:06 stanton Exp $ + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#undef STATIC_BUILD #include "tcl.h" /* - * Prototypes for procedures defined later in this file: + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkge_Init declaration is in the source file itself, which is only + * accessed when we are building a library. */ +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT -static int Pkgd_SubCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int argc, char **argv)); -static int Pkgd_UnsafeCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int argc, char **argv)); /* *---------------------------------------------------------------------- * * Pkge_Init -- * - * This is a package initialization procedure, which is called - * by Tcl when this package is to be added to an interpreter. + * This is a package initialization procedure, which is called by Tcl + * when this package is to be added to an interpreter. * * Results: * Returns TCL_ERROR and leaves an error message in interp->result. @@ -41,13 +40,14 @@ static int Pkgd_UnsafeCmd _ANSI_ARGS_((ClientData clientData, *---------------------------------------------------------------------- */ -int -Pkge_Init(interp) - Tcl_Interp *interp; /* Interpreter in which the package is - * to be made available. */ +EXTERN int +Pkge_Init( + Tcl_Interp *interp) /* Interpreter in which the package is to be + * made available. */ { - static char script[] = "if 44 {open non_existent}"; - if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) { + static const char script[] = "if 44 {open non_existent}"; + + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } return Tcl_Eval(interp, script); |
