Check-in [015d254dbe]
Overview
Comment:Fixed determination of encoding from system in KitDLL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 015d254dbe60204994a37928f284e4f860d18211
User & Date: rkeene on 2010-10-02 06:58:39
Other Links: manifest | tags
Context
2010-10-02
08:39
Updated Minkit build scripts to support buildint KitDLL

Added fix for building KitDLL on platforms without working "strtod"

Updated to support compiling TclVFS extension with "-fPIC" when building KitDLL check-in: e143e5ef08 user: rkeene tags: trunk

06:58
Fixed determination of encoding from system in KitDLL check-in: 015d254dbe user: rkeene tags: trunk
06:14
Add documentation about KitDLL check-in: bf5a9f5551 user: rkeene tags: trunk
Changes

Modified kitdll/buildsrc/kitdll-0.0/configure.ac from [1f754d4d41] to [ae66df7b9e].

16
17
18
19
20
21
22



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33



34
35
36
37
38
39
40







+
+
+








-
-
-







AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])

dnl Determine how to create a shared object
DC_GET_SHOBJFLAGS

dnl Find the appropriate Tcl headers and libraries
DC_DO_TCL

dnl Find required libs
DC_FIND_TCLKIT_LIBS

dnl Check for Tcl features
SAVE_LIBS="${LIBS}"
LIBS="${ARCHS} ${LIBS}"
dnl Check for the ability to get the current system encoding
AC_CHECK_FUNCS(Tcl_GetEncodingNameFromEnvironment Tcl_SetSystemEncoding)
LIBS="${SAVE_LIBS}"

dnl Find required libs
DC_FIND_TCLKIT_LIBS

dnl Find extra objects we need to link as a part of "libtclkit"
AC_SUBST(EXTRA_OBJS)

dnl Check for optional headers
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h string.h strings.h)

Modified kitdll/buildsrc/kitdll-0.0/kitInit.c from [1913b3a1f3] to [733eebf3f2].

200
201
202
203
204
205
206




207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

228
229
230
231
232
233
234
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

231
232
233
234
235
236
237
238







+
+
+
+




















-
+








/*
 * This function exists to allow C code to initialize a particular
 * interpreter.
 */
static int tclkit_init_initinterp(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
	char *kitdll_path;
#ifdef TCLKIT_CAN_SET_ENCODING
	Tcl_DString encodingName;
#endif /* TCLKIT_CAN_SET_ENCODING */


#ifdef _WIN32
	Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY);
#else   
	Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY);
#endif

	kitdll_path = find_tclkit_dll_path();
	if (kitdll_path != NULL) {
		Tcl_SetVar(interp, "tclKitFilename", kitdll_path, TCL_GLOBAL_ONLY);

		free(kitdll_path);
	}

	FindAndSetExecName(interp);

#ifdef TCLKIT_CAN_SET_ENCODING
	/* Set the encoding from the Environment */
	Tcl_GetEncodingNameFromEnvironment(&encodingName);
	Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName));
	Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);
	Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), TCL_GLOBAL_ONLY);
	Tcl_DStringFree(&encodingName);
#endif  

	return(TCL_OK);
}

/*